Skip to content

Commit

Permalink
Merge pull request #449 from KhronosGroup/fix/anisotropic_filtering
Browse files Browse the repository at this point in the history
Avoid anisotropic filtering in combination with nearest filtering
  • Loading branch information
UX3D-kanzler authored Dec 19, 2022
2 parents 62b75d5 + 25a197f commit e47ba27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/Renderer/webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ class gltfWebGl

if (this.context.supports_EXT_texture_filter_anisotropic)
{
this.context.texParameterf(type, this.context.anisotropy, this.context.maxAnisotropy); // => 16xAF
if ((gltfSamplerObj.magFilter !== GL.NEAREST)
&& (gltfSamplerObj.minFilter === GL.NEAREST_MIPMAP_LINEAR || gltfSamplerObj.minFilter === GL.LINEAR_MIPMAP_LINEAR ))
{
this.context.texParameterf(type, this.context.anisotropy, this.context.maxAnisotropy); // => 16xAF
}
}
}
}
Expand Down

0 comments on commit e47ba27

Please sign in to comment.