Clipping planes for Clipping Space ? :)

Started by
0 comments, last by sirob 17 years, 2 months ago
Hello ! Does anyone know how to use clip planes in DirectX9, using IDirect3DDevice::SetClipPlane(...) method, for programmable pipeline. In DirectX SDK documentation is written : "When the fixed function pipeline is used the plane equations are assumed to be in world space. When the programmable pipeline is used the plane equations are assumed to be in the clipping space (the same space as output vertices).". Taking into account that one of parameters passed to the "SetClipPlane" function is an array of 4 floats representing the plane equation, how do I transform that equation into the clipping space ? Thank you
Advertisement
You can use D3DXPlaneTransform to transform a plane by a transformation matrix. Also, note this method takes the inverse transpose of the matrix you want to transform by.

Hope this helps.
Sirob Yes.» - status: Work-O-Rama.

This topic is closed to new replies.

Advertisement