xenko icon indicating copy to clipboard operation
xenko copied to clipboard

SamplerState.OpenGL doesn't properly set the MaxAnisotropy parameter

Open guygodin opened this issue 7 years ago • 0 comments

I'm not sure if I should do a Pull Request but here's the bug I've found:

https://github.com/SiliconStudio/xenko/blob/6fca455a2d67f6f53fc1c7ad8c3722938b3b9a56/sources/engine/SiliconStudio.Xenko.Graphics/OpenGL/SamplerState.OpenGL.cs#L145

the line should be:

GL.TexParameter(target, (TextureParameterName)OpenTK.Graphics.ES20.ExtTextureFilterAnisotropic.TextureMaxAnisotropyExt, maxAnisotropy);

What happens currently is if you apply an Anisotropic SamplerState override and then switch back to Linear, it will continue to render with Anisotropic because the MaxAnisotropy will still be 16 (even though it should be 1 because of the AnisotropicMask)

guygodin avatar Apr 15 '18 20:04 guygodin