Skip to content

Viewer: Add shadow support #16459

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

Open
wants to merge 110 commits into
base: master
Choose a base branch
from

Conversation

alexandremottet
Copy link
Contributor

@alexandremottet alexandremottet commented Apr 8, 2025

In the viewer, add the support for :

  • shadow map,
  • ibl shadows
  • shadow quality selection normal, high

For now, ibl shadows are dissabled for meshes that have animations in WebGPU even if the animation is paused as there is some issues.

The auto shadow selection will come in another PR.
The placement of the light will come in another PR.

Edit from @ryantrem: from local testing, these are the remaining issues I'm seeing:

  • Shadow map shadows don't work when "statically" enabled (e.g. <babylon-viewer shadow-quality="normal">).
  • IBL shadows do not update when an animation is running. I assume this is not supported in IBL shadows, but if that is the case, should we disallow IBL shadows for animated models?
  • IBL shadows seem to get into a bad state after I load a few different models. This can be reproed in the Viewer test app by just dragging and dropping a sequence of models with IBL shadows enabled. After a few models, I start seeing wrong shadows or significant rendering artifacts. I'm not sure if there is a missing accumulator reset, or if this is a bug in IBL shadows or what.

@bjsplat
Copy link
Collaborator

bjsplat commented Apr 30, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 2, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented May 2, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 2, 2025

@Popov72 Popov72 changed the title Add shadow support Viewer: Add shadow support May 2, 2025
@bjsplat
Copy link
Collaborator

bjsplat commented May 12, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented May 12, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented May 12, 2025

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Collaborator

bjsplat commented May 12, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 12, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented May 12, 2025

@thomlucc thomlucc mentioned this pull request May 14, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants