• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Shaders How do I add a light to this scene?

CraterHater

Member
Hey,

I've got this scene right here and I would like to add a sun to it. It should look as if the buildings are being lit up by a light floating above the room. Any ideas on how to implement this? I am very new to shaders so if anyone could point me in the right direction or to a good resource please let me know!


shader.png

Thanks!
 
R

robproctor83

Guest
Lighting can be a really complicated thing, especially if your looking for shader based lighting. I think typically there are 2 types of lighting, static lights that don't emit shadows, and dynamic lights which cast a shadow. You could use shaders for static lights I'm sure, but you could also do it with a simple gradient mask and a blendmode. A lot of the lighting shaders in the market will come with a static and a dynamic shader and let you choose the one you want. My suggestion, either find an existing system that you like from here:


Or, you can follow one of these tutorials and try adapting it for what you want



Best of luck
 
Top