diff options
author | Ethan-Hall <Ethan1080> | 2022-03-21 15:46:12 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-03-21 15:47:08 +0300 |
commit | be3eef19c0b5d253375c332fcf107c46c3ad53ec (patch) | |
tree | ee8c479cd705e7611b630beb16bcc099786e2a0c /source/blender | |
parent | c5456819ee4904b6b1ec59b3f4ef705d29f170ac (diff) |
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
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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); |