Jump to content
  • Advertisement

Archived

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

foniks munkee

Clamping texture coords.

This topic is 5166 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 all, I was just following a tutorial regarding textures and DX9. However the tutorial was written with an earlier version of the DX9 SDK - can anyone explain how this method has changed and whether it is still possible to clamp a texture using IDirect3DDevice9::SetTextureStageState()?? I can''t seem to find anything on this..
g_pDevice->SetTextureStageState(0, D3DTSS_ADDRESSU, D3DTADDRESS_CLAMP);
g_pDevice->SetTextureStageState(0, D3DTSS_ADDRESSV, D3DTADDRESS_CLAMP);
 
Thanks.

Share this post


Link to post
Share on other sites
Advertisement
All SetTextureStageState options to do with texturing are now part of the SetSamplerState call. I think the logic behind this is that sampler states still apply when using pixel shaders, while TextureStateStages are replaced by the pixel shader.

pDev->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTEXADDRESS_CLAMP)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!