Browse Source

Revert "WebGLRenderer: Remove redundant clear in transmission pass. (#28447)" (#28806)

This reverts commit a65fbf7fbdc7bda99e06af50a7e885db2e50afc2.
Michael Herzog 1 year ago
parent
commit
1f389d035b
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/renderers/WebGLRenderer.js

+ 2 - 8
src/renderers/WebGLRenderer.js

@@ -1490,15 +1490,9 @@ class WebGLRenderer {
 			_currentClearAlpha = _this.getClearAlpha();
 			if ( _currentClearAlpha < 1 ) _this.setClearColor( 0xffffff, 0.5 );
 
-			if ( _renderBackground ) {
-
-				background.render( scene );
-
-			} else {
-
-				_this.clear();
+			_this.clear();
 
-			}
+			if ( _renderBackground ) background.render( scene );
 
 			// Turn off the features which can affect the frag color for opaque objects pass.
 			// Otherwise they are applied twice in opaque objects pass and transmission objects pass.