Skip to content

Commit 29f38b8

Browse files
committed
Enable all layer for WebGLBackgrond.
Before mrdoob#22426, when not using array camera, the background doesn't participate in layer calculation. We feel the old behaviour is better because we don't need to always add layer `0` to the camera when doing multipass rendering. This commit enables all layer for the background. Note that the behaviour is still slightly different from r115: When the camera's layer **mask** is set to 0, r115 will render background and now won't.
1 parent 2f413de commit 29f38b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/renderers/webgl/WebGLBackground.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipli
9898
fog: false
9999
} )
100100
);
101+
boxMesh.layers.enableAll();
101102

102103
boxMesh.geometry.deleteAttribute( 'normal' );
103104
boxMesh.geometry.deleteAttribute( 'uv' );
@@ -161,6 +162,7 @@ function WebGLBackground( renderer, cubemaps, state, objects, alpha, premultipli
161162
fog: false
162163
} )
163164
);
165+
planeMesh.layers.enableAll();
164166

165167
planeMesh.geometry.deleteAttribute( 'normal' );
166168

0 commit comments

Comments
 (0)