Explorar o código

Hide scene background when XR Session environmentBlendMode is additive

Morgan Villedieu %!s(int64=6) %!d(string=hai) anos
pai
achega
aca41425ee
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/renderers/webgl/WebGLBackground.js

+ 3 - 0
src/renderers/webgl/WebGLBackground.js

@@ -27,6 +27,9 @@ function WebGLBackground( renderer, state, objects, premultipliedAlpha ) {
 
 		var background = scene.background;
 
+		var session = renderer.vr.getSession();
+		if ( session && session.environmentBlendMode === 'additive' ) background = null;
+
 		if ( background === null ) {
 
 			setClear( clearColor, clearAlpha );