From 32284f34e39b9612c5a291d6cd9e4985ec7de305 Mon Sep 17 00:00:00 2001 From: Ethan-Hall Date: Mon, 21 Mar 2022 13:46:12 +0100 Subject: GPU: Allow the user to set an anisotropic filtering setting below the implementation-defined value of `GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT` Allow the user to set an anisotropic filtering setting below the implementation-defined value of `GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT`. This bug-fix is also needed for 2.93 LTS. Reviewed By: fclem Differential Revision: https://developer.blender.org/D14392 --- source/blender/gpu/opengl/gl_texture.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index d84d21d3021..2bcb2631de9 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -544,7 +544,7 @@ void GLTexture::samplers_update() float max_anisotropy = 1.0f; glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max_anisotropy); - float aniso_filter = max_ff(max_anisotropy, U.anisotropic_filter); + float aniso_filter = min_ff(max_anisotropy, U.anisotropic_filter); for (int i = 0; i <= GPU_SAMPLER_ICON - 1; i++) { eGPUSamplerState state = static_cast(i); -- cgit v1.2.3