MODULE // shadowfx

Ridges cast moving shadows as the sun crosses the sky

Ridges shade valleys as the sun moves, in your own engine material.

Compare Ochre Pass at sunrise with horizon shading off and the same sunrise with ridges casting shadows
Ochre Pass at sunrise with horizon shading offThe same sunrise with ridges casting shadows
Ochre Pass at sunrise
Sunrise
Ochre Pass at noon
Noon
Ochre Pass at sunset
Sunset

Use terrain shadows in a material →

Questions

How does shadowfx shade valleys as the sun moves?

shadowfx stores horizon angles by direction from the terrain heights so a runtime shader can test sun visibility as ridges block light.

What files does a shadowfx compile return?

It returns packed horizon PNG textures, a horizon JSON file, a preview image and a Godot shader include.

Can shadowfx work in engines other than Godot?

Yes, Unity, Unreal Engine and three.js can port the horizon sampling math into their own terrain shaders using the exported textures.