Archived

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

Redeye101

DX8 uv scrolling

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
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