This is demo of gpu-based volumetric lightshafts, described by Kenny Mitchell (EA) in GPUGems3. Demo code and algo based on sources of Sebastien Hillaire (http://sebastien.hillaire.free.fr/demos ... godray.htm) and ported to Ogre by me.
source and demo(vs2010)
As like Sebastien, i have found a bug with current code (just fly around model in scene and u'll see it). Kenny Mitchell write about this:
Code: Select all
when facing perpendicular to the source, the light's screen-space location can tend toward infinity and therefore lead to large separation between samples. This can be diminished by clamping the screen-space location to an appropriate guard-band region. Alternatively, the effect can be faded toward the perpendicular and is further decreased when using an occlusion method.