r/godot•
TheRealPancakelord

Hiding Volumetric fog and retaining light shafts?

help me

Hi ive spent a while going over various ways to try and "optimally" implement non-screenspace lightshafts (i.e. they'll still shine when not looking at the sun)

My game is a 6DOF game (ie. a space piloting game) so my early attempts with meshes that basically blend in and out to fake light rays were pretty poor as that approach (basically anything to do with billboarding) usually works best, visually, with games that dont involve a lot of camera rotation

Screenspace is easy enough with a fullscreen quad - i had a version via camera compositor effects partially working too, but kept getting visual corruption as thats hitting the edges of my skills]

But, before i take a crack at writing raymarched shaders, (probably applied to a massive box encompassing the whole level) Ive read that its possible to use the built in volumetric fog to achieve more or less this - ive tried experimenting with setting fog to black, and fog densities, and cranking up directional light values but it always results in either a hazy level (whilst i can justify some fog for e.g. nebulae, in deep space this looks odd) or everything is black (as its hard to tune lighting)

Is there any way to use the volumetric fog worldenvironment, to render light shafts, but visually disable (effectively this would be like fog denisty = 0.00) fog that is unlit?

Posted Nov 1, 2025, 1:07 PM UTC

20
Loading comments…