[Bf-blender-cvs] [be3eef19c0b] master: GPU: Allow the user to set an anisotropic filtering setting below the implementation-defined value of `GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT`
Ethan-Hall
noreply at git.blender.org
Mon Mar 21 13:47:33 CET 2022
Commit: be3eef19c0b5d253375c332fcf107c46c3ad53ec
Author: Ethan-Hall
Date: Mon Mar 21 13:46:12 2022 +0100
Branches: master
https://developer.blender.org/rBbe3eef19c0b5d253375c332fcf107c46c3ad53ec
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
===================================================================
M source/blender/gpu/opengl/gl_texture.cc
===================================================================
diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc
index 4ab9360daaa..b78e30e8b4c 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -569,7 +569,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<eGPUSamplerState>(i);
More information about the Bf-blender-cvs
mailing list