Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTelanor

Posted 06 June 2012 - 07:49 PM

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of it. If I look at the terrain in the distance with mipmapping on and linear filtering, the grid lines become blurry fairly quickly and further back the grid is pretty much invisible. With these settings, I don't get any moire patterns at all. If I turn on anisotropic filtering, however, the higher the anisotropic level, the more the terrain looks like it did with without mipmapping. The lines are much crisper nearby but in the distance I start to see terrible moire patterns.

My understanding was that mipmapping is supposed to get rid of moire patterns. I've always had anisotropic filtering on in every game I play and I've never noticed any moire patterns as a result, so I don't understand why it's happening in my game. Am I doing something wrong?

I've created my sampler state like so (I'm using slimdx):

ssa = SamplerState.FromDescription(Engine.Device, new SamplerDescription
{
	AddressU = TextureAddressMode.Clamp,
	AddressV = TextureAddressMode.Clamp,
	AddressW = TextureAddressMode.Clamp,
	Filter = Filter.Anisotropic,
	MaximumAnisotropy = anisotropicLevel,
	MinimumLod = 0,
	MaximumLod = float.MaxValue
});

Edit: Something I just thought of. I use logarithmic depth instead of the standard depth, could that be affecting the mipmapping? If it is, how do I resolve the issue?

#3Telanor

Posted 06 June 2012 - 07:46 PM

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of it. If I look at the terrain in the distance with mipmapping on and linear filtering, the grid lines become blurry fairly quickly and further back the grid is pretty much invisible. With these settings, I don't get any moire patterns at all. If I turn on anisotropic filtering, however, the higher the anisotropic level, the more the terrain looks like it did with without mipmapping. The lines are much crisper nearby but in the distance I start to see terrible moire patterns.

My understanding was that mipmapping is supposed to get rid of moire patterns. I've always had anisotropic filtering on in every game I play and I've never noticed any moire patterns as a result, so I don't understand why it's happening in my game. Am I doing something wrong?

I've created my sampler state like so (I'm using slimdx):

ssa = SamplerState.FromDescription(Engine.Device, new SamplerDescription
{
	AddressU = TextureAddressMode.Clamp,
	AddressV = TextureAddressMode.Clamp,
	AddressW = TextureAddressMode.Clamp,
	Filter = Filter.Anisotropic,
	MaximumAnisotropy = anisotropicLevel,
	MinimumLod = 0,
	MaximumLod = float.MaxValue
});

#2Telanor

Posted 06 June 2012 - 07:45 PM

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of it. If I look at the terrain in the distance with mipmapping on and linear filtering, the grid lines become blurry fairly quickly and further back the grid is pretty much invisible. With these settings, I dont get any moire patterns at all. If I turn on anisotropic filtering, however, the higher the anisotropic level, the more the terrain looks like it did with no mipmapping at all. The lines get much crisper nearby but in the distance I start to see terrible moire patterns.

My understanding was that mipmapping is supposed to get rid of moire patterns. I've always had anisotropic filtering on in every game I play and I've never noticed any moire patterns as a result, so I don't understand why it's happening in my game. Am I doing something wrong?

I've created my sampler state like so (I'm using slimdx):

ssa = SamplerState.FromDescription(Engine.Device, new SamplerDescription
{
	AddressU = TextureAddressMode.Clamp,
	AddressV = TextureAddressMode.Clamp,
	AddressW = TextureAddressMode.Clamp,
	Filter = Filter.Anisotropic,
	MaximumAnisotropy = anisotropicLevel,
	MinimumLod = 0,
	MaximumLod = float.MaxValue
});

#1Telanor

Posted 06 June 2012 - 07:43 PM

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more then a solid green color with a black grid overlayed on top of it. If I look at the terrain in the distance with mipmapping on and linear filtering, the grid lines become blurry fairly quickly and further back the grid is pretty much invisible. With these settings, I dont get any moire patterns at all. If I turn on anisotropic filtering, however, the higher the anisotropic level, the more the terrain looks like it did with no mipmapping at all. The lines get much crisper nearby but in the distance I start to see terrible moire patterns.

My understanding was that mipmapping is supposed to get rid of moire patterns. I've always had anisotropic filtering on in every game I play and I've never noticed any moire patterns as a result, so I don't understand why it's happening in my game. Am I doing something wrong?

I've created my sampler state like so (I'm using slimdx):

ssa = SamplerState.FromDescription(Engine.Device, new SamplerDescription
{
	AddressU = TextureAddressMode.Clamp,
	AddressV = TextureAddressMode.Clamp,
	AddressW = TextureAddressMode.Clamp,
	Filter = Filter.Anisotropic,
	MaximumAnisotropy = anisotropicLevel,
	MinimumLod = 0,
	MaximumLod = float.MaxValue
});

PARTNERS