SLI Zone
NVIDIA.com Developer Home

Last Updated: 05 / 21 / 2004

Oblique Frustum Clipping

code_75.gifThis example aligns the hardware near clip plane with an aribitraily oriented, user specified plane.  The result is that you get an arbitrary near clip plane for no cost, since depth values below zero will be clipped by the hardware.  The projection matrix is modified to shear the Z values to align with the user specified clip plane.

Because the projection matrix is modified, the depth values are different. This is fine for uses like render-to-texture or rendering mirror or portal views, but it cannot be arbitrarily enabled and disabled within a scene the way you can with user clipping planes.

Demos for both DirectX and OpenGL are available as attachments.

Please note that the 'x' key toggles between geometry clip plane and projection matrix near clip plane.








Direct3D Demo (.zip) ( 541 KB)

OpenGL Demo (.zip) ( 350 KB)


nvidiadeveloper Twitterfeed
Popular References
Recommended Books
CUDA By Example
Programming Massively Parallel Processors






More Recommendations...

Free Books Online