Jump to content
  • Advertisement
Sign in to follow this  
vladic2000x

Boundary texture problem when filtering is enabled

This topic is 4735 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. in my skybox, all of six faces have at all the boundaries a white line. So the illusion of a surrounding world is perturbed. I read somewhere that it is due to filtering. i changed the filter option to NONE, and the problem disappeared. But unfiltered textures doesn't look very well. Can someone suggets how to fix it.

Share this post


Link to post
Share on other sites
Advertisement
There isn't always a good option to this, but you can tweak the texture wrapping parameters to good effect:

Point your browser at IDirect3DDevice9::SetSamplerState() and have a look at the D3DSAMPLERSTATETYPE enumeration. In particular the D3DSAMP_ADDRESSU and D3DSAMP_ADDRESSV enumerations.

Setting one (or both) of these indicates what D3D9 will do in these "boundary cases". I often find that D3DTADDRESS_CLAMP for both the U and V addressing can eliminate a large number of artifacts.

Device->SetSampleState( 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
Device->SetSampleState( 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );


hth
Jack

Share this post


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

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