-
Notifications
You must be signed in to change notification settings - Fork 855
Minimal enclosing sphere backport to 2021.2 #5722
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
Minimal enclosing sphere backport to 2021.2 #5722
Conversation
Backport of minimal enclosing sphere solution for shadow frustum culling. #4436 Co-authored-by: Erik Hakala <erik.hakala@unity3d.com> Co-authored-by: Oleksandr Kokoshyn <oleksandr.kokoshyn@unity3d.com>
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. HDRP URP Shader Graph VFX SRP Core Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
com.unity.render-pipelines.universal/Runtime/Data/UniversalRenderPipelineAsset.cs
Show resolved
Hide resolved
get => 2.0f; | ||
} | ||
|
||
public static int maxNumIterationsEnclosingSphere |
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.
Missing public API docs.
set { m_ConservativeEnclosingSphere = value; } | ||
} | ||
|
||
public int numItertionsEnclosingSphere |
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.
Missing an "a" in "Iterations"
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.
Thank you for catching this!!!
|
||
/// <summary> | ||
/// Set to true to enable a conservative method for calculating the size and position of the minimal enclosing sphere around the frustum cascade corner points for shadow culling. | ||
/// </summary> |
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.
@oleks-k can you review this?
…cs into universal/minimal_enclosing_sphere_backport
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.
Ran it through the same tests as for the original version, and toggling on enclosing spheres fixes the shadow issues. Nice!
…cs into universal/minimal_enclosing_sphere_backport
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.
Looks good.
Backport of minimal enclosing sphere solution for shadow frustum culling.
#4436
Checklist for PR maker
need-backport-*
label. After you backport the PR, the label changes tobackported-*
.CHANGELOG.md
file.Purpose of this PR
Fixes bug where shadows disappear in the frustum corners from false positives in the shadow culling.
fogbugz.unity3d.com/f/cases/1153151
Testing status
Tested with URP default template and custom cascade positioning.
Comments to reviewers
Dependent on this change to trunk.
https://ono.unity3d.com/unity/unity/pull-request/131872/_/2021.2/minimal_enclosing_cascade_sphere