Skip to content

Commit

Permalink
WebGPURenderer: Fix shadow layers (#28451)
Browse files Browse the repository at this point in the history
* Fix shadow layers

* cleanup
  • Loading branch information
sunag committed May 22, 2024
1 parent b38ef16 commit 1164bf1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/jsm/nodes/lighting/AnalyticLightNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class AnalyticLightNode extends LightingNode {
updateShadow( frame ) {

const { rtt, light } = this;
const { renderer, scene } = frame;
const { renderer, scene, camera } = frame;

const currentOverrideMaterial = scene.overrideMaterial;

Expand All @@ -191,6 +191,7 @@ class AnalyticLightNode extends LightingNode {
rtt.setSize( light.shadow.mapSize.width, light.shadow.mapSize.height );

light.shadow.updateMatrices( light );
light.shadow.camera.layers.mask = camera.layers.mask;

const currentToneMapping = renderer.toneMapping;
const currentRenderTarget = renderer.getRenderTarget();
Expand Down

0 comments on commit 1164bf1

Please sign in to comment.