This topic is now archived and is closed to further replies.


help: directx BUMP

Recommended Posts

tomwindcloud    122
I know almost all of theory of bump, but when i employ the directx bump, i was so confused. I think the directx bump is a special bump, there are some questions about it. I try a bump demo with a plane of rectangle, it has 4 vertexs. the questions are: 1. Bump Mapping Formulas: after setting D3DTSS_BUMPENVMAT00 D3DTSS_BUMPENVMAT01 D3DTSS_BUMPENVMAT10 D3DTSS_BUMPENVMAT11, we can get Du'' and Dv''.Thus the result texture coordinates U = u + Du'';V=v+Dv''. The u and v is the initial texture coordinates. Is right??? if it is right, then-> 2. Why i can''t get the right envmap image. We know Stage 2 is a specular environment map, but unfortunately i can''t get the right envmap image, why???? 3. another question: In stage 2, i must SetTextureStageState( 2, D3DTSS_TEXCOORDINDEX, 0 ), i can get the right bump image. But, for some reason if i can exchange the TEXCOORDINDEX??? For example i use the third TEXCOORDINDEX as envmap. On my own test, i can''t do this. why??

Share this post

Link to post
Share on other sites