In order to save fillrate, I thought about moving near and far planes to bound tightly the light volume, while rendering light interactions, to clip the geometry that is not inside the light volume but is still rendered using expensive per pixel computations.
This would be something like the scissor optimization but in the z-axis.
In theory that could be done changing the projection matrix and mapping the new depths with DepthRange. However, different floating point computations yield different depth values, so it doesn’t seem to be possible.
Is the hardware able to do this, but it’s not exposed? or there is no way around this problem?
I heard about the nv_depth_bounds extension. However, it does not test the fragment depth value, but the depth value of the depth buffer.
[This message has been edited by castano (edited 04-02-2003).]