• Advertisement
Sign in to follow this  

water - projective texture problem

This topic is 4370 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I succesfully render reflections to a texture and now want to project it to my water plane. This is what I'm doing:
Matrix4 matProject(0.5f,0.0f,0.0f,0.5f,0.0f,0.5f,0.0f,0.5f,0.0f,0.0f,0.5f,0.5f,0.0f,0.0f,0.0f,1.0f);
Matrix4 mTransposed = matWorld * view * projection;
Matrix4 mTransposed2 = matProject * projection * view;
mTransposed = mTransposed.Transpose();
mTransposed2 = mTransposed2.Transpose();


dcl_position v0

m4x4 r0, v0, c6
rcp r1, r0.w
mul r0, r0, r1

m4x4 oPos, v0, c0
mov oT0, r0

Well, there is something like a texture on my water plane now, but it is extremely stretched and moves weirdly with the viewer. I guess my matrix operation at mTransform is the problem (I have already tried several calculation orders, which did not help). I can't use shader 2.0 (-> tex2dproj), the highest version I am allowed to use is 1.4. Do I have to write a pixel shader at all? If yes, how does it look? Although I've read probably all threads and articles concerning this subject, I can't find my mistake. tHx for help!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement