Skip to content

fix(core): disable lighting in ShadowPass - #10890

Merged
charlieforward9 merged 3 commits into
masterfrom
fix/shadow-pass-disable-lighting
Oct 26, 2026
Merged

charlieforward9 merged 3 commits into
masterfrom
fix/shadow-pass-disable-lighting

Conversation

@charlieforward9

@charlieforward9 charlieforward9 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Closes #10887
Introduced by #7605

Background

SimpleMeshLayer lights its color after DECKGL_FILTER_COLOR. In the shadow pass, that filter is where the shadow module writes the depth, so lighting scales the stored depth and lit meshes shadow themselves. This PR disables lighting in ShadowPass, as PickLayersPass already does. Reordering the shader instead would break TerrainExtension's lit drape (#7605).

Change List

  • ShadowPass: disable the lighting module
  • Unit tests
  • Render test shadow-effect-simple-mesh with new golden image

Top left: master. Bottom right: this PR. The other two panels are the existing workarounds.

simple-mesh-shadow-before-after

Both new tests fail on master.

🤖 Generated with Claude Code

SimpleMeshLayer applies Phong lighting after DECKGL_FILTER_COLOR, where
the shadow module writes the RGBA-packed depth. In the shadow pass the
stored depth was therefore scaled by the lighting factor (0.77 with the
default material and a 45 degree light), and every lit SimpleMeshLayer
fell inside its own shadow. Disable the lighting module in the shadow
pass, as PickLayersPass already does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

ShadowPass now disables lighting so SimpleMeshLayer does not change the depth stored in the shadow map.

  • Shadow maps keep their depth when layers use lighting.

Reviews (3) · Last reviewed commit: "Merge branch 'master' into fix/shadow-pa..." · Reviewed by Greptile

@coveralls

coveralls commented Oct 22, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 84.157% (+0.006%) from 84.151% — fix/shadow-pass-disable-lighting into master

@ibgreen ibgreen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed; the ShadowPass lighting fix is ready to approve.

@charlieforward9
charlieforward9 merged commit a9a1790 into master Oct 26, 2026
8 checks passed
@charlieforward9
charlieforward9 deleted the fix/shadow-pass-disable-lighting branch October 26, 2026 02:48
chrisgervang pushed a commit that referenced this pull request Oct 26, 2026
SimpleMeshLayer applies Phong lighting after DECKGL_FILTER_COLOR, where
the shadow module writes the RGBA-packed depth. In the shadow pass the
stored depth was therefore scaled by the lighting factor (0.77 with the
default material and a 45 degree light), and every lit SimpleMeshLayer
fell inside its own shadow. Disable the lighting module in the shadow
pass, as PickLayersPass already does.

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit a9a1790)
@chrisgervang

Copy link
Copy Markdown
Collaborator

Released in deck.gl 9.4.1. Thanks @charlieforward9!

@chrisgervang chrisgervang mentioned this pull request Oct 29, 2026
29 of 30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Lit SimpleMeshLayer shadows itself under a _shadow DirectionalLight

4 participants