Browse Source

Set background to null only if it's a color

Garrett Johnson 4 years ago
parent
commit
4f708fbcd1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/extras/PMREMGenerator.js

+ 1 - 1
src/extras/PMREMGenerator.js

@@ -271,6 +271,7 @@ class PMREMGenerator {
 		if ( background && background.isColor ) {
 
 			_backgroundColor.copy( background );
+			scene.background = null;
 
 		} else {
 
@@ -287,7 +288,6 @@ class PMREMGenerator {
 		_backgroundColor.multiplyScalar( Math.pow( 2.0, - fExp ) );
 		const alpha = ( fExp + 128.0 ) / 255.0;
 		renderer.setClearColor( _backgroundColor, alpha );
-		scene.background = null;
 
 
 		for ( let i = 0; i < 6; i ++ ) {