 |
This shader computes 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.
|