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

Frequent shadow acne and/or peter panning #1308

Closed
tomas7770 opened this issue Sep 14, 2024 · 0 comments · Fixed by #1370
Closed

Frequent shadow acne and/or peter panning #1308

tomas7770 opened this issue Sep 14, 2024 · 0 comments · Fixed by #1370

Comments

@tomas7770
Copy link
Contributor

Description

When using lights with shadow casters, it's very easy to come across shadow acne and/or peter panning. This was apparent when adding shadows to some of our demos.

While the existing bias field of shadow casters can help mitigate this, it often requires manual adjustment for each light to get decent results, and it can be difficult to fix acne without causing peter panning, or vice versa. In addition, in some cases, both artifacts may be present.

Expected behaviour

Shadows should draw without acne or peter panning, preferably with minimum user intervention.

Screenshots

Some shadow acne is visible in this screenshot of Scraps vs Zombies, particularly the further away the light is from its origin.
image

Possible solutions

Initially, the possibility of automatically adjusting the shadow bias based on the light angle was explored. This helps reduce user intervention, but doesn't solve the problem of balancing acne with peter panning, and in some scenarios doesn't help at all (e.g. the spot lights in the Cars demo).

A better solution would be to use a shadow normal offset bias, as described here. Some quick testing on the demos reveals this to actually be a lot more effective than what we currently have.

@tomas7770 tomas7770 added S-Triage Issues whose priority still has to be figured out A-Engine B-Rendering C-Bug labels Sep 14, 2024
@RiscadoA RiscadoA removed the S-Triage Issues whose priority still has to be figured out label Sep 29, 2024
@GalaxyCrush GalaxyCrush self-assigned this Oct 9, 2024
@tomas7770 tomas7770 added this to the 0.5 milestone Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants