Skip to content

Commit c2a469a

Browse files
committed
WebGLRenderer: renderState lights needs to be updated per ArrayCamera's subcamera.
1 parent 47a76b1 commit c2a469a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/renderers/WebGLRenderer.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,8 @@ function WebGLRenderer( parameters ) {
13661366

13671367
}
13681368

1369+
currentRenderState.setupLights( camera2 );
1370+
13691371
renderObject( object, scene, camera2, geometry, material, group );
13701372

13711373
}
@@ -1691,7 +1693,7 @@ function WebGLRenderer( parameters ) {
16911693

16921694
}
16931695

1694-
if ( refreshProgram || camera !== _currentCamera ) {
1696+
if ( refreshProgram || _currentCamera !== camera ) {
16951697

16961698
p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix );
16971699

@@ -1702,11 +1704,9 @@ function WebGLRenderer( parameters ) {
17021704

17031705
}
17041706

1705-
// Avoid unneeded uniform updates per ArrayCamera's sub-camera
1706-
1707-
if ( _currentCamera !== ( _currentArrayCamera || camera ) ) {
1707+
if ( _currentCamera !== camera ) {
17081708

1709-
_currentCamera = ( _currentArrayCamera || camera );
1709+
_currentCamera = camera;
17101710

17111711
// lighting uniforms depend on the camera so enforce an update
17121712
// now, in case this material supports lights - or later, when

0 commit comments

Comments
 (0)