|
@@ -1,4 +1,4 @@
|
|
|
-import { BackSide, FrontSide, CubeUVReflectionMapping } from '../../constants.js';
|
|
|
+import { BackSide, FrontSide, CubeUVReflectionMapping, sRGBEncoding } from '../../constants.js';
|
|
|
import { BoxGeometry } from '../../geometries/BoxGeometry.js';
|
|
|
import { PlaneGeometry } from '../../geometries/PlaneGeometry.js';
|
|
|
import { ShaderMaterial } from '../../materials/ShaderMaterial.js';
|
|
@@ -108,6 +108,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 = ( background.encoding === sRGBEncoding ) ? false : true;
|
|
|
|
|
|
if ( currentBackground !== background ||
|
|
|
currentBackgroundVersion !== background.version ||
|
|
@@ -163,6 +164,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 = ( background.encoding === sRGBEncoding ) ? false : true;
|
|
|
|
|
|
if ( background.matrixAutoUpdate === true ) {
|
|
|
|