Hi all,
I’ve been looking into implementing Day/Night lighting in a game I’m working on. I have a basic proof of concept but was hoping to get some recommendations for improving simplicity/scalability.
The way I’m implementing it currently, I have a sub-graph which takes in texture/normal info as well as data about the sun (direction, color, etc…).
This gets added to whatever material needs to be lit and works pretty well:
My concern is mostly with scalability. This requires that I update each material that needs to be lit or implement some sort of messaging for objects with instanced materials.
I’m very new to shaders and graphics in general, so it’s likely I’m missing a simple solution. Some of the other things I’ve tried are.
- Using a Freeform light at an arbitrarily large distance with no falloff (This is promising, but wasn’t sure how it would look with camera movement)
- Using a post-processing blit (I could not figure out how to pass normal map data to the shader if that is even possible)
Any suggestions to improve this would be appreciated. Like I said, I’m pretty new to this, so it’s likely I’m just completely unaware of a simple solution here.