Sign in to follow this  
vladic2000x

Boundary texture problem when filtering is enabled

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this