Light Shafts

Light Shafts can be generated by directional lights to simulate the real world effect of crepuscular rays, or atmospheric shadowing of atmospheric in-scattering. These rays add depth and realism to any scene.


The directional light has a Light Shaft category in its properties, below is a reference for those properties.

Property Description

Directional Light

Enable Light Shaft Occlusion Whether to occlude fog and atmosphere in-scattering with screen-space blurred occlusion from this light.
Occlusion Mask Darkness Controls how dark the occlusion masking is. A value of 1 results in no darkening term. While values greater than 1 and less than 0 can be used, they will create more specialized effects.
Occlusion Depth Range Everything closer to the camera than this distance will occlude light shafts.
Enable Light Shaft Bloom Whether to render light shaft bloom from this light. For directional lights, the color around the light direction will be blurred radially and then added back to the scene.
Bloom Scale This will scale the additive color of the bloom, making it more or less pronounced.
Bloom Threshold Scene color must be larger than this to create bloom in the light shafts.
Bloom Tint Multiplies against scene color to create the bloom color. It colorizes the light shaft bloom effect.
Light Shaft Override Direction Can be used to make light shafts come from somewhere other than the light's actual direction (only used when non-zero and does not have to be normalized).

Occlusion Method

The occlusion method creates a mask from the depths of the objects on the screen, blurs it away from the light, and uses it to mask fog and atmosphere. This acts more like real life light shafts in that the shadowing of the fog is what creates the light shafts. Note that this also means that your light shafts can only be as strong as your fog / atmosphere. This is intended to be used in games trying for a more realistic look.

The sun directional light can be slightly off the screen and still produce occlusion light shafts, however, they currently fade out as you approach a 90 degree angle from the sun.

Bloom Method

The bloom method captures the scene's color (including translucency and fog in-scattering) right around the light source in world space, and blurs it radially away from the light. This method is not really emulating anything that happens in the real world but it is very controllable (not limited by density of fog) and looks impressive. The bloom method works best when there is an interesting bright area around the sun disk, like brightly lit clouds. This is because a bright sun disk will cause some aliasing since it is so small, and the blur is an image space operation.

GPU Cost

These effects (occlusion and bloom) cost separately, so it is best to only enable the one you want. At 1080p on a 680GTX, occlusion is .5ms and bloom on a single light is .68ms.