From bb5b1f36fef9d15e9c9a142268690efe5350cec1 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 4 Sep 2023 22:19:28 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Levi Pesin <35454228+LeviPesin@users.noreply.github.com> --- src/renderers/webgl/WebGLBackground.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/webgl/WebGLBackground.js b/src/renderers/webgl/WebGLBackground.js index b1ee3efd6982ac..c236a0c2039a89 100644 --- a/src/renderers/webgl/WebGLBackground.js +++ b/src/renderers/webgl/WebGLBackground.js @@ -109,7 +109,7 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? - 1 : 1; boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness; boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity; - boxMesh.material.toneMapped = ( ColorManagement.getTransfer( background.colorSpace ) === SRGBTransfer ) ? false : true; + boxMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer; if ( currentBackground !== background || currentBackgroundVersion !== background.version || @@ -165,7 +165,7 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, planeMesh.material.uniforms.t2D.value = background; planeMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity; - planeMesh.material.toneMapped = ( ColorManagement.getTransfer( background.colorSpace ) === SRGBTransfer ) ? false : true; + planeMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer; if ( background.matrixAutoUpdate === true ) {