[Bf-blender-cvs] [abc017ae0b5] master: GLTexture: Fix Anisotropic filtering affecting the standard mipmap samplers

Clément Foucault noreply at git.blender.org
Tue Oct 20 14:55:21 CEST 2020


Commit: abc017ae0b5e99db314390d7bcd1c66756772351
Author: Clément Foucault
Date:   Tue Oct 20 14:54:51 2020 +0200
Branches: master
https://developer.blender.org/rBabc017ae0b5e99db314390d7bcd1c66756772351

GLTexture: Fix Anisotropic filtering affecting the standard mipmap samplers

Everything's in the title...

===================================================================

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 111af76f958..070a86509ff 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -530,7 +530,7 @@ void GLTexture::samplers_update(void)
 
   for (int i = 0; i <= GPU_SAMPLER_ICON - 1; i++) {
     eGPUSamplerState state = static_cast<eGPUSamplerState>(i);
-    if (state & GPU_SAMPLER_MIPMAP) {
+    if ((state & GPU_SAMPLER_ANISO) && (state & GPU_SAMPLER_MIPMAP)) {
       glSamplerParameterf(samplers_[i], GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso_filter);
     }
   }



More information about the Bf-blender-cvs mailing list