|
@@ -22,6 +22,7 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
|
|
|
// so we can recompile the material accordingly.
|
|
|
var currentBackground = null;
|
|
|
var currentBackgroundVersion = 0;
|
|
|
+ var currentTonemapping = null;
|
|
|
|
|
|
function render( renderList, scene, camera, forceClear ) {
|
|
|
|
|
@@ -108,12 +109,14 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
|
|
|
boxMesh.material.uniforms.flipEnvMap.value = texture.isCubeTexture ? - 1 : 1;
|
|
|
|
|
|
if ( currentBackground !== background ||
|
|
|
- currentBackgroundVersion !== texture.version ) {
|
|
|
+ currentBackgroundVersion !== texture.version ||
|
|
|
+ currentTonemapping !== renderer.toneMapping ) {
|
|
|
|
|
|
boxMesh.material.needsUpdate = true;
|
|
|
|
|
|
currentBackground = background;
|
|
|
currentBackgroundVersion = texture.version;
|
|
|
+ currentTonemapping = renderer.toneMapping;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -166,12 +169,14 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
|
|
|
planeMesh.material.uniforms.uvTransform.value.copy( background.matrix );
|
|
|
|
|
|
if ( currentBackground !== background ||
|
|
|
- currentBackgroundVersion !== background.version ) {
|
|
|
+ currentBackgroundVersion !== background.version ||
|
|
|
+ currentTonemapping !== renderer.toneMapping ) {
|
|
|
|
|
|
planeMesh.material.needsUpdate = true;
|
|
|
|
|
|
currentBackground = background;
|
|
|
currentBackgroundVersion = background.version;
|
|
|
+ currentTonemapping = renderer.toneMapping;
|
|
|
|
|
|
}
|
|
|
|