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

Disable spot light's shadow pancaking in Urp. #8081

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

Conversation

FrostyLeaves
Copy link

Purpose of this PR

When a Spot Light casts shadows from a large triangle, shadow splitting can occur. This issue arises because the Shadow Pancaking, used in the vertex shader to optimize the light range for directional lights, cannot handle the rendering of large triangles correctly. However, most Spot Lights have an acceptable effective range. Therefore, it is desirable to add a toggle to disable Shadow Pancaking for Spot Lights.

issue:

image

fixed:

image

Testing status

A simple test scene was used and tested on PC with DirectX11 and on Android with GLES (without Reverse Z).

@FrostyLeaves FrostyLeaves marked this pull request as ready for review June 26, 2024 05:21
@FrostyLeaves FrostyLeaves requested a review from a team as a code owner June 26, 2024 05:21
@memphis88 memphis88 requested a review from a team as a code owner August 13, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant