diff --git a/examples/screenshots/webgl_furnace_test.jpg b/examples/screenshots/webgl_furnace_test.jpg index cc6fc5567dc5ab9795c2fa87effae56249d88a6a..6e04e389b610e0df60b352f3212a6d20bed3bf58 100644 Binary files a/examples/screenshots/webgl_furnace_test.jpg and b/examples/screenshots/webgl_furnace_test.jpg differ diff --git a/examples/webgl_furnace_test.html b/examples/webgl_furnace_test.html index 8a2abd1bbe8d8ba019ed87cf44fd79ebef72d1a1..a7eb433387b03a6a83eb5b7a49e6bf3fb8175cd3 100644 --- a/examples/webgl_furnace_test.html +++ b/examples/webgl_furnace_test.html @@ -72,7 +72,7 @@ // camera - camera = new THREE.OrthographicCamera( frustumSize * aspect / - 2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / - 2, 1, 30 ); + camera = new THREE.OrthographicCamera( frustumSize * aspect / - 2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / - 2, 1, 30 ); camera.position.set( 0, 0, 10 ); } @@ -110,14 +110,14 @@ return new Promise( function ( resolve ) { const envScene = new THREE.Scene(); - envScene.background = new THREE.Color( COLOR ); // sRGB colorspace assumed, apparently + envScene.background = new THREE.Color( COLOR ); + if ( renderer.outputEncoding === THREE.sRGBEncoding ) envScene.background.convertSRGBToLinear(); const pmremGenerator = new THREE.PMREMGenerator( renderer ); radianceMap = pmremGenerator.fromScene( envScene ).texture; pmremGenerator.dispose(); scene.background = new THREE.Color( COLOR ); - if ( renderer.outputEncoding !== THREE.sRGBEncoding ) scene.background.convertSRGBToLinear(); resolve(); diff --git a/src/extras/PMREMGenerator.js b/src/extras/PMREMGenerator.js index 6eaeb85f48df2ccb9506d27061db6a9140d58f5b..dc7bc5c7406184d10a488ab96d84fe460e3a1f6e 100644 --- a/src/extras/PMREMGenerator.js +++ b/src/extras/PMREMGenerator.js @@ -296,7 +296,7 @@ class PMREMGenerator { if ( background.isColor ) { - backgroundMaterial.color.copy( background ).convertSRGBToLinear(); + backgroundMaterial.color.copy( background ); scene.background = null; const alpha = convertLinearToRGBE( backgroundMaterial.color ); @@ -307,7 +307,7 @@ class PMREMGenerator { } else { - backgroundMaterial.color.copy( _clearColor ).convertSRGBToLinear(); + backgroundMaterial.color.copy( _clearColor ); const alpha = convertLinearToRGBE( backgroundMaterial.color ); backgroundMaterial.opacity = alpha;