Archived

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

monkey_face

"scrolling" sky?

Recommended Posts

Just make a function that changes the texture coordinates. I would suggest you move the coordinates according to how much time has elapsed so that you get the same results on any machine. After the tex coordinates are changed, just call your render function and it should work fine.

Share this post


Link to post
Share on other sites
Just make a function that changes the texture coordinates. I would suggest you move the coordinates according to how much time has elapsed so that you get the same results on any machine. After the tex coordinates are changed, just call your render function and it should work fine.

Share this post


Link to post
Share on other sites
Don''t actually change texture coordinates, use a texture transform, here''s the code I use to move my sky:

m_pd3dDevice->SetTextureStageState(0, DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2);

m_matrixScrollTexture._31 += fTextureX;
m_matrixScrollTexture._32 -= fTextureY;
m_matrixScrollTexture._33 += fTextureZ;

m_pd3dDevice->SetTransform( D3DTS_TEXTURE0, &m_matrixScrollTexture);

Share this post


Link to post
Share on other sites