您的位置:首页 > 产品设计 > UI/UE

NV Oblique Frustum Clipping demo

2016-07-19 10:10 435 查看
 


ATTACHMENTS

Direct3D Demo (.zip) ( 541 KB)
OpenGL Demo (.zip) ( 350 KB)


Oblique Frustum Clipping

 

 


This 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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: