Original Post
🔒 Locked
texture distortion
Advertisement
Try changing the texture filtering mode to anisotropic or higher. I'm not sure what language you're using but here's the C++ and C# version.
pd3dDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_ANISOTROPIC );
pd3dDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_ANISOTROPIC );
device.SamplerState[0].MagFilter = TextureFilter.Anisotropic;
device.SamplerState[0].MinFilter = TextureFilter.Anisotropic;
Hope that helps.
pd3dDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_ANISOTROPIC );
pd3dDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_ANISOTROPIC );
device.SamplerState[0].MagFilter = TextureFilter.Anisotropic;
device.SamplerState[0].MinFilter = TextureFilter.Anisotropic;
Hope that helps.
I'm not sure anisotropic filtering will have much benefit until you start rotating the textures around - from those screenshots they're screen-aligned?
I'd go after the texture coordinates myself. I've seen odd effects like you've shown (although with more regularity) when the texture coordinates are evenly slightly off-centre. Most pixels will get sampled correctly, but some will eventually get rounded incorrectly and the wrong pixel gets sampled...
If this is for screen-aligned rendering have you followed the rules shown in the "Directly mapping texels to pixels" article?
hth
Jack
I'd go after the texture coordinates myself. I've seen odd effects like you've shown (although with more regularity) when the texture coordinates are evenly slightly off-centre. Most pixels will get sampled correctly, but some will eventually get rounded incorrectly and the wrong pixel gets sampled...
If this is for screen-aligned rendering have you followed the rules shown in the "Directly mapping texels to pixels" article?
hth
Jack
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement
source texture:
Anyone familiar with this type of distortion? I tried various parameters for TextureLoader.FromFile function, without luck though.