Skip to content

Fragment shader to transition between sunrise and sunset.

Notifications You must be signed in to change notification settings

abbas-dhd/bos_sunrise_sunset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

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!

About

Fragment shader to transition between sunrise and sunset.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages