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

Open
tomas7770 opened this issue Sep 14, 2024 · 0 comments
Open

Frequent shadow acne and/or peter panning #1308

tomas7770 opened this issue Sep 14, 2024 · 0 comments
Labels
A-Engine B-Rendering C-Bug S-Triage Issues whose priority still has to be figured out

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Engine B-Rendering C-Bug S-Triage Issues whose priority still has to be figured out
Projects
None yet
Development

No branches or pull requests

1 participant