Original Post
So, I'm trying to use clip planes with the programmable pipeline. I'm aware of needing to have the plane in "clipping space (the same space as output vertices)", though I'm not too sure what that means. I've reduced my code (C#) to this: For the first item, an ID3DXMesh, the plane works as expected, cutting anything with a Y of over 0.0f. For the terrain however, it seems to produce a plane that isn't in the correct orientation, and seems to move with the camera, instead of "staying in one place". I've tried transforming the plane myself with several combinations of Transform, TransformCoord, and TransformNormal, with no luck. Also, I doubt Plane.Transform isn't implemented well. Frankly, I'm baffled. I've heard/read some chatter about SetClipPlanes not playing well with the programmable pipeline on NVidia FX cards. I'm on a 7600, so I'm not sure if that would fall in that category, but even still, am I unable to use clip planes? I always have the option of just using texkill in the PS, but that seems like a workaround to me, not a solution. Anyone have any experiences with this kind of stuff? Thanks for reading :).
Plane pl = Plane.FromPointNormal(new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 1.0f, 0.0f));
m_Device.ClipPlanes[0].Enabled = true;
m_Device.ClipPlanes[0].Plane = pl;
m_Ship.Draw(); // Draw an object with the FFP (ID3DXMesh).
m_Device.ClipPlanes[0].Plane = Plane.Transform(pl, m_Device.Transform.View * m_Device.Transform.Projection);
m_Renderer.DrawTree(m_Tree); // Draw the terrain with a VS + PS.