Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShadowNode: Ensure background does not influence shadow map. #30170

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Dec 19, 2024

Fixed #30111.

Description

The PR makes sure the scene background does not affect the shadow map anymore.

@sunag We might want to rename PostProcessingUtils to RendererUtils maybe^^?

Copy link

github-actions bot commented Dec 19, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.4
79.05
339.4
79.05
+0 B
+0 B
WebGPU 486.67
135.01
486.76
135.02
+95 B
+15 B
WebGPU Nodes 486.13
134.91
486.23
134.94
+95 B
+32 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.3
112.11
465.3
112.11
+0 B
+0 B
WebGPU 555.76
150.47
557.09
150.77
+1.32 kB
+297 B
WebGPU Nodes 511.83
140.23
513.15
140.53
+1.32 kB
+295 B

@sunag
Copy link
Collaborator

sunag commented Dec 19, 2024

@sunag We might want to rename PostProcessingUtils to RendererUtils maybe^^?

I'm happy we're so aligned, as I was considering this as well :)

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Dec 19, 2024

The PR breaks the motion blur demo. Investigating...

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Dec 19, 2024

There was actually a bug in resetRendererAndSceneState() (no reset for renderer properties happened). I have refactored the module slightly so this oversight does not happen anymore.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Dec 19, 2024

@sunag With this PR, the shadows in webgpu_shadowmap_opacity look a bit darker. That happens because the scene's background does not influence the shadow map anymore (verified this by toggle the scene reset). I think the shadow color is now more correct.

@Mugen87 Mugen87 added this to the r172 milestone Dec 19, 2024
@Mugen87 Mugen87 merged commit d3b07d6 into mrdoob:dev Dec 19, 2024
12 checks passed
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.

backgroundNode color renders in the shadow map
2 participants