Browse Source

WebGLBackground: Documented new logic.

Mr.doob 6 years ago
parent
commit
30b37e7b3b
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/renderers/webgl/WebGLBackground.js

+ 9 - 1
src/renderers/webgl/WebGLBackground.js

@@ -27,8 +27,16 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
 
 
 		var background = scene.background;
 		var background = scene.background;
 
 
+		// Ignore background in AR
+		// TODO: Reconsider this.
+
 		var session = renderer.vr.getSession();
 		var session = renderer.vr.getSession();
-		if ( session && session.environmentBlendMode === 'additive' ) background = null;
+
+		if ( session && session.environmentBlendMode === 'additive' ) {
+
+			background = null;
+
+		}
 
 
 		if ( background === null ) {
 		if ( background === null ) {