Skip to content

Commit 53765c3

Browse files
authored
chore: move variable (#27615)
1 parent b8df030 commit 53765c3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/jsm/renderers/webgl/utils/WebGLTextureUtils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,12 @@ class WebGLTextureUtils {
202202

203203
if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {
204204

205-
const extension = extensions.get( 'EXT_texture_filter_anisotropic' );
206-
207205
if ( texture.magFilter === NearestFilter ) return;
208206
if ( texture.minFilter !== NearestMipmapLinearFilter && texture.minFilter !== LinearMipmapLinearFilter ) return;
209207
if ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension for WebGL 1 and WebGL 2
210208

211209
if ( texture.anisotropy > 1 || currentAnisotropy !== texture.anisotropy ) {
212-
210+
const extension = extensions.get( 'EXT_texture_filter_anisotropic' );
213211
gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, backend.getMaxAnisotropy() ) );
214212
backend.get( texture ).currentAnisotropy = texture.anisotropy;
215213

0 commit comments

Comments
 (0)