   I failed in add reflection on the water,here is the source code.
  I''d like add a reflection on a plane use "render to texture" method.I referenced the document about Automatically Generated Texture Coordinates in dx8sdk .but the reflection in the wrong positon,is there something wrong with my code?please tell me.thanks in advance.......struct ENVMAPPEDVERTEX{    D3DXVECTOR3 p; // Position    D3DXVECTOR3 n; // Normal    float tu,tv;};//update:render the scene to texturevoid update(){    ......    ENVMAPPEDVERTEX* pv;    if( FAILED( m_pVB->Lock( 0, m_dwNumVertices*sizeof(ENVMAPPEDVERTEX), (BYTE**)&pv, 0 ) ) )    return E_FAIL;    //caculate the reflectmatrix    D3DXMATRIX matView, matReflect,matSet;    D3DXPLANE plane;    D3DXPlaneFromPoints( &plane, &(pv[0].p),&(pv[1].p),&(pv[2].p));    D3DXMatrixReflect( &matReflect, &plane );    m_pVB->Unlock();    //Store the current backbuffer and zbuffer    LPDIRECT3DSURFACE8 pBackBuffer, pZBuffer;    lpDev->GetRenderTarget( &pBackBuffer );    lpDev->GetDepthStencilSurface( &pZBuffer );    DWORD bShowStats,dwNumLastRenderedFaces, dwNumLastRenderedVerts;    lpDev->SetTransform( D3DTS_WORLD, &matReflect );    lpDev->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );    LPDIRECT3DSURFACE8 pCubeMapFace;    m_pMap->GetSurfaceLevel(0 , &pMapFace );    lpDev->SetRenderTarget( peMapFace, pZBuffer);    pCubeMapFace->Release();    //Render the scenelpDev->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(0,0,255), 1.0f, 0L );    lpDev->BeginScene();    RenderScene();    lpDev->EndScene();    // Change the rendertarget back to the main backbuffer    lpDev->SetRenderTarget( pBackBuffer, pZBuffer );    pBackBuffer->Release();    pZBuffer->Release();}//render the scenevoid Render(){   ......    lpDev->SetVertexShader( D3DFVF_ENVMAPVERTEX );    //Turn on texture-coord generation for cubemapping    lpDev->SetTextureStageState( 0, D3DTSS_ADDRESSU,   D3DTADDRESS_CLAMP );    lpDev->SetTextureStageState( 0, D3DTSS_ADDRESSV,D3DTADDRESS_CLAMP );    lpDev->SetTextureStageState( 0, D3DTSS_MINFILTER,    D3DTEXF_LINEAR );    lpDev->SetTextureStageState( 0, D3DTSS_MAGFILTER,    D3DTEXF_LINEAR );    D3DMATRIX mat;    lpDev->GetTransform( D3DTS_PROJECTION,&mat );    lpDev->SetTransform( D3DTS_TEXTURE0,&mat;    lpDev->SetTransform( D3DTRANSFORMSTATE_TEXTURE0,    &mat );lpDev->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX,  D3DTSS_TCI_CAMERASPACEPOSITION );    lpDev->SetTextureStageState( 0,D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_PROJECTED|D3DTTFF_COUNT3 );//Render the object with the environment-mapped body    lpDev->SetTexture( 0, m_pMap );    hResult = lpDev->DrawIndexedPrimitive( D3DPT_TRIANGLELIST,   0, m_dwNumVertices, 0, m_dwNumFaces);    //Restore the render states    ......} 
  who can help me?please. ;  Do you have a screen shot of what''s not working?  Or a more detailed description?Chris ;  I think  i had set a wrong texture project matrix.but i didn''t know how to get the correct matrix. 