Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan-Hall <Ethan1080>2022-03-21 15:46:12 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-03-24 12:47:18 +0300
commit3dc36b32a1e34fac8c1f266284ae0c44366c3a98 (patch)
tree36ad7551482859c5c8d715738680a9f24d7f749e
parentb6039cd82fd0ac04fba604694f8694b1e95afe09 (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
-rw-r--r--source/blender/gpu/opengl/gl_texture.cc2
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 fe04c5084e2..9e075f77b9a 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -547,7 +547,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);