diff --git a/src/extras/PMREMGenerator.js b/src/extras/PMREMGenerator.js index dc7bc5c7406184d10a488ab96d84fe460e3a1f6e..f5231d660469f28a3d19ec6ca41aa2a6cf28d667 100644 --- a/src/extras/PMREMGenerator.js +++ b/src/extras/PMREMGenerator.js @@ -99,17 +99,6 @@ const _axisDirections = [ * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view */ -function convertLinearToRGBE( color ) { - - const maxComponent = Math.max( color.r, color.g, color.b ); - const fExp = Math.min( Math.max( Math.ceil( Math.log2( maxComponent ) ), - 128.0 ), 127.0 ); - color.multiplyScalar( Math.pow( 2.0, - fExp ) ); - - const alpha = ( fExp + 128.0 ) / 255.0; - return alpha; - -} - class PMREMGenerator { constructor( renderer ) { @@ -298,9 +287,6 @@ class PMREMGenerator { backgroundMaterial.color.copy( background ); scene.background = null; - - const alpha = convertLinearToRGBE( backgroundMaterial.color ); - backgroundMaterial.opacity = alpha; useSolidColor = true; } @@ -308,9 +294,6 @@ class PMREMGenerator { } else { backgroundMaterial.color.copy( _clearColor ); - - const alpha = convertLinearToRGBE( backgroundMaterial.color ); - backgroundMaterial.opacity = alpha; useSolidColor = true; }