-
Notifications
You must be signed in to change notification settings - Fork 855
Fix stale data for main light directional cookie. #5828
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
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. URP 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. |
|
||
real3 SampleMainLightCookie(float3 samplePositionWS) | ||
{ | ||
if(!IsMainLightCookieEnabled()) |
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 space between if
and (
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.
:)
private enum LightCookieShaderFormat | ||
{ | ||
None = -1, | ||
|
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.
The extra line done on purpose or by accident?
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.
On purpose, since it's a bit special and enums often do not have negative values.
Test failures don't appear to be related to this PR or light cookies. This only touches light-cookie shaders and C#. |
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.
Please read the Contributing guide before making a PR.
Checklist for PR maker
need-backport-*
label. After you backport the PR, the label changes tobackported-*
.CHANGELOG.md
file.Purpose of this PR
Fix using stale date for directional light cookies, when only additional lights have a cookie.
Fix bug case: 1354575
The main and additional lights used to have a different keyword to toggle them on/off. Currently they share a keyword to save variants. This caused the main light cookie to not turned off properly if there was additional lights and use stale data.
Now we clear the stale data and also test the main light cookie is actually turned on.
Backport: 21.2
Testing status
Ran local tests.
Comments to reviewers
Notes for the reviewers you have assigned.