Light shafts
This effect is taken from nVidia GPU Gems 3 book : a post processing effect to generate light shafts due to the sun light scattering in the air which contain, for example, gas molecules.
The implementation is the same eccepted that I add an extra blur pass to avoid visible arctifacts due to a limited number of samples. I also generate a fake sky : you can control sun altitude by using '+' and '-' key.
Download
source and executable
![]() |
The
'ray of god' effect |
![]() |
Without
the extra blur pass |
![]() |
With
the extra blur pass, the resulting image is softer |
![]() |
As
a post process, the effect is not looking good when you look outward the
sun |