-
Notifications
You must be signed in to change notification settings - Fork 855
[Universal] [2021.1 Backport] Make sure upgrading to Universal RP 2021 does not change Spot Light shadow resolutions #3832
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
Conversation
…dditionalLightData.AdditionalLightsShadowMinimumResolution
…e Spot Light shadow resolutions (internal ticket https://fogbugz.unity3d.com/f/cases/1316540 )
It appears that you made a non-draft PR! |
…lues if it seems that they have never been customized (@Verasl suggestion)
…ltShadowResolutionTier... constant definitions outside of #if UNITY_EDITOR block
…nsparentReceiveShadow spot light shadow resolution to higher tier to match previous settings
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.
LGTM
… (comment)) (cherry picked from commit 82f939d)
…ith the one in 2021.2 pull request - see conversation #3831 (comment)
…shadow-resolution-auto-upgrade
…eiveShadow spot light shadow resolution to higher tier to match previous settings
Everything looks OK on both 2021.2 and 2021.1, I'm merging the pull requests. |
Purpose of this PR
#2126 added to Universal RP support for custom shadow resolution for additional lights.
When a Universal RP project is upgraded to a Universal RP package containing those changes, its UniversalRenderPipeline Assets get new "Shadow Resolution Tiers" fields added with default values 256/512/1024 ; and its spot light shadows get assigned the lowest tier resolution.
The lower resolution might cause the visual quality of spot light shadows in a project to look worse after the upgrade.
This pull request ensures that after upgrade, spot light shadows will keep using the same resolution.
This is done by using the highest tier resolution as default.
Taking inspiration from@Verasl suggestion, during upgrade the 3 tier resolutions are also modified according to the additional light shadow atlas resolution set in the asset (respectively: full-res, half-res, quarter res if possible).
Testing status
In a test scene based on UniversalRP template scene added with shadowed spot lights, I locally checked that the changes in this pull request effectively conserve spot light shadow resolutions after the upgrade to Unity 2021.
Comments to reviewers
Effort tracked by internal ticket https://fogbugz.unity3d.com/f/cases/1316540
2021.2 Main pull-request: #3831