• Advertisement

Archived

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

DX8 uv scrolling

This topic is 5074 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

Here''s a code snippet that isn''t working properly in my code. I am just trying to do a simple uv scroll. The really weird part is that I can change the scale values in the matrix and it affects the uv''s just as expected. But, if I translation values make no difference at all! Any ideas here? I''m guessing I have some state messed up, but I''m hitting a dead-end. Thanks in advance... static float testu = 0.5; static float testv = 0.0; static D3DMATRIX m_texGenSphereMatrix = {1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1}; m_texGenSphereMatrix._41 = testu; m_texGenSphereMatrix._42 = testv; testv+= 0.01f; if (testv > 1.0f) testv = 0.0f; m_pd3dDevice->SetTransform(D3DTS_TEXTURE0, &m_texGenSphereMatrix); m_pd3dDevice->SetTextureStageState(0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2);

Share this post


Link to post
Share on other sites
Advertisement
Pretend row 3 isn''t there, and so row 4 goes into row 3 (because you only have 2 element vectors, ie: You''re using COUNT2)

In other words,
m_texGenSphereMatrix._31 = testu;
m_texGenSphereMatrix._32 = testv;

Share this post


Link to post
Share on other sites
Hey thanks! Worked as advertised. I guess it makes sense that it would only use 3x3 in this case, but I wish the docs mentioned that.

Thanks again!

Share this post


Link to post
Share on other sites

  • Advertisement