-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Contact Shadows #22382
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
base: main
Are you sure you want to change the base?
Contact Shadows #22382
Conversation
tychedelia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding or updating an existing example?
|
Sure, I was going to ask the crowd where it would make sense to add to an example. |
|
It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note. Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes. |
|
Closes #16164 |
|
Does it make sense to do the raymarching directly in the material shader? It might give better perf to pull it out to its own pass. Also MeshletMesh needs testing with this feature (and in the various forward/deferref/prepass modes). |
|
I have an example for contact shadows that I made in my old branch: https://github.com/pcwalton/bevy/blob/contact-shadows/examples/3d/contact_shadows.rs Feel free to steal it if you want, or not (it's rather old and would need to be updated). Up to you :) |
|
@JMS55 I don't think the raymarching can really be done anywhere else, because in forward you need to know what's in shadow right then. You can't really subtract a light after the fact. (Well, maybe you technically could make it work, but that'd be a huge can of worms.) |
|
The generated |
|
This 07f2b89 commit adds a bunch of diffs from renaming the shadow map setting, per discord. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The blast radius of the shadow_maps_enabled was bigger than I expected.
IceSentry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor notes but other than that LGTM. Massive visual improvements, thank you!
|
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
|
@aevyrie can we break the shadow map renaming code out into a new PR? |
|
Sure, would that add any value? |
|
It would help for review, but also e.g. Solari has shadows, but dosen't use shadow maps, so it's already misleading as-is. |
Objective
Solution
Showcase
Screen.Recording.2026-01-07.at.11.18.18.PM.mp4
Screen.Recording.2026-01-04.at.7.19.25.PM.mp4
Screen.Recording.2026-01-04.at.7.36.03.PM.mp4