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

CSM Shadows broken #30053

Closed
RenaudRohlinger opened this issue Dec 7, 2024 · 1 comment · Fixed by #30060 or #30064
Closed

CSM Shadows broken #30053

RenaudRohlinger opened this issue Dec 7, 2024 · 1 comment · Fixed by #30060 or #30064

Comments

@RenaudRohlinger
Copy link
Collaborator

RenaudRohlinger commented Dec 7, 2024

Description

Related:
#29849
#29989
#29991

The CSM shadows aren't working anymore.

One of the issues seems to be shadows flickering when moving the camera. I believe the shadow matrices should be updated before rendering. I’d suggest adding onUpdateBefore and onUpdateAfter hooks in Node as they seems to be necessary anyway, (I noticed similar issues with reflector and postprocessing), along with associated helpers like onRenderUpdateBefore. However, I’m not sure if this alone would fully resolve the issue. Another problem is that only one shadow appears to be rendered, which might indicate that only one matrix is being updated correctly. /cc @sunag

Live example

https://rawcdn.githack.com/mrdoob/three.js/dev/examples/webgpu_shadowmap_csm.html

Screenshots

image

Version

r171

@RenaudRohlinger
Copy link
Collaborator Author

@sunag Thanks for the quick update! Unfortunately, half of the issue is still here. It seems the shadow matrix is updated too late, causing the shadows to flicker when moving the camera in the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants