Skip to content

Commit

Permalink
Fix regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy committed Aug 25, 2023
1 parent 5170d67 commit 614102b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/renderers/shaders/UniformsUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { LinearSRGBColorSpace } from '../../constants.js';
import { ColorManagement } from '../../math/ColorManagement.js';

/**
Expand Down
10 changes: 6 additions & 4 deletions src/renderers/webgl/WebGLTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,12 +739,13 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
state.activeTexture( _gl.TEXTURE0 + slot );

const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace );

Check warning on line 741 in src/renderers/webgl/WebGLTextures.js

View workflow job for this annotation

GitHub Actions / Lint testing

'workingPrimaries' is assigned a value but never used
const texturePrimaries = ColorManagement.getPrimaries( texture.colorSpace );
const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace );

Check warning on line 742 in src/renderers/webgl/WebGLTextures.js

View workflow job for this annotation

GitHub Actions / Lint testing

'texturePrimaries' is assigned a value but never used
const unpackConversion = texture.colorSpace === NoColorSpace ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;

_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL );
_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion );

const needsPowerOfTwo = textureNeedsPowerOfTwo( texture ) && isPowerOfTwo( texture.image ) === false;
let image = resizeImage( texture.image, needsPowerOfTwo, false, maxTextureSize );
Expand Down Expand Up @@ -1156,12 +1157,13 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
state.activeTexture( _gl.TEXTURE0 + slot );

const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace );

Check warning on line 1159 in src/renderers/webgl/WebGLTextures.js

View workflow job for this annotation

GitHub Actions / Lint testing

'workingPrimaries' is assigned a value but never used
const texturePrimaries = ColorManagement.getPrimaries( texture.colorSpace );
const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace );

Check warning on line 1160 in src/renderers/webgl/WebGLTextures.js

View workflow job for this annotation

GitHub Actions / Lint testing

'texturePrimaries' is assigned a value but never used
const unpackConversion = texture.colorSpace === NoColorSpace ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL;

_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL );
_gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion );

const isCompressed = ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture );
const isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );
Expand Down

0 comments on commit 614102b

Please sign in to comment.