

This shader computes exact lighting and shadowing in volumetric data (ie. a 3d texture). The idea is to implement a ray marcher directly into the fragment program of the NV30. Each time a pixel textured by the volumetric data is rendered, a ray is cast towards the light. Densisty is integrated along the ray and then exact lightning is computed. This method allows to render colored shadows of semi-transparent objects. Thanks to CG and NV30 this can be entirely done in hardware. Moreover, if the 3d texture is applied to a geometric model the lightning computation is only done if the pixel is visible.
Here are some movies of the shader. All movies are encoded using DivX 5.0.2. Little movies are better with a 200% zoom factor.
As this shader was done in a hurry for the contest, there is no user interface. So changing the scene should be done directly in the source code (it's ugly ... shame on me ;)
Simply choose one of the following lines (by commenting/uncommenting) in CVolumeObject.h:
[CVolumeObject.h line 86] //m_uiDensTexId=buildCube(); //m_uiDensTexId=buildNoise(); //m_uiDensTexId=buildMikado(); //m_uiDensTexId=buildFish(); m_uiDensTexId=buildScene();