Skip to main content
gamedev.net
🔒 Locked

problem with texture projecting

Started by BlueChip Feb 20, 2005 at 11:56 AM 0 replies 650+ views
Original Post
BlueChip
BlueChip
Hi folks.. I'm trying to make a good water reflection... maybe... no of sure I don't understand texture projecting bases.. because I get a terrible result. This is the path that I follow: 1)create a plane with this FVF const DWORD MIRRORVERTEX::FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1; 2)render reflected world onto a 512x512 texture 3)render this one on my plane

m_pd3dDevice->SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, D3DTSS_TCI_CAMERASPACEPOSITION);
m_pd3dDevice->SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_PROJECTED | D3DTTFF_COUNT3);
m_pd3dDevice->SetTexture(0,m_pRenderTexture);	

maybe this is not enough? I've seen some sources in OGL forum, where they made strange matrix operations... but they perhaps don't have D3DTTFF_PROJECTED flag.
BlueChip
BlueChip
UP!
from third page... to first one...

I must done it, because texture projection is the only real great solution...

Before I tried with stencil buffer reflaction, but Adriano_usp helps me to understand that it was not a right way.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.