sunrise.sunset.transition.mp4
This is a simple GLSL fragment shader that creates a smooth transition between gradients representing sunrise and sunset as a challenge on Book of Shaders. The effect was inspired by JC Nesci’s implementation.
You can preview and interact with the shader using this link.
This shader uses a combination of smoothstep and mix functions to create color gradients and timing and sin/cos functions to simulate the transition between day and night. It smoothly interpolates between the colors to create a visually pleasing sunrise to sunset effect.
You can see a live preview of this shader and experiment with it on GLSL Sandbox.
This shader was inspired by the work of JC Nesci.
Feel free to contribute, report issues, or provide feedback to help improve this shader!