Skip to content

Latest commit

 

History

History
25 lines (12 loc) · 1.08 KB

README.md

File metadata and controls

25 lines (12 loc) · 1.08 KB

Sunrise to Sunset Transition Shader

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.

How it Works

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.

Preview

You can see a live preview of this shader and experiment with it on GLSL Sandbox.

Credits

This shader was inspired by the work of JC Nesci.


Feel free to contribute, report issues, or provide feedback to help improve this shader!