aye joreg,
thanks for teh answer, but i was trying to cut the scene at ground level into upper and lower half to render sperate passes. (upper half -> diffuse / lower half -> reflection map) so i was thinking of something like the code below in vvvv. (does unfortunately not seem like it’s implemented yet) are there other ways to achieve said behaviour?
also it would be really nice to have a c# dx renderer plugin example at some time if thats possible. (ok, i’m dreaming again…^^)
edit: code sample taken from dx sdk. (values are straight from the example so these are not the planes i actually want to clip)
D3DXVECTOR3 a(-1.5f, 1.5f, 3.0f );
D3DXVECTOR3 b( 1.5f, 1.5f, 3.0f );
D3DXVECTOR3 c( -1.5f,-1.5f, 3.0f );
D3DXVECTOR3 d( 1.5f,-1.5f, 3.0f );
// Construct the reflection matrix
D3DXPlaneFromPoints( &plane, &a, &b, &c );
D3DXMatrixReflect( &matReflectInMirror, &plane );
m_pd3dDevice->SetTransform( D3DTS_WORLD, &matReflectInMirror );
// Reverse the cull mode (since normals will be reflected)
m_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_CW );
// Set the custom clip planes (so geometry is clipped by mirror edges).
// This is the heart of this sample. The mirror has 4 edges, so there are
// 4 clip planes, each defined by two mirror vertices and the eye point.
m_pd3dDevice->SetClipPlane( 0, *D3DXPlaneFromPoints( &plane, &b, &a, &m_vEyePt ) );
m_pd3dDevice->SetClipPlane( 1, *D3DXPlaneFromPoints( &plane, &d, &b, &m_vEyePt ) );
m_pd3dDevice->SetClipPlane( 2, *D3DXPlaneFromPoints( &plane, &c, &d, &m_vEyePt ) );
m_pd3dDevice->SetClipPlane( 3, *D3DXPlaneFromPoints( &plane, &a, &c, &m_vEyePt ) );
m_pd3dDevice->SetRenderState( D3DRS_CLIPPLANEENABLE,
D3DCLIPPLANE0 | D3DCLIPPLANE1 | D3DCLIPPLANE2 | D3DCLIPPLANE3 );
// Render the reflected scene. For the "normal" scene, RenderScene() was prior called from another function with default render states.
RenderScene();