Skip to content

Fix issue with light layers > 7 in the deferred path #1054

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

Merged

Conversation

FrancescoC-unity
Copy link
Contributor

Because we store light layers in a UNORM we can only safely represent values [0...255], however we don't enforce that so any value above 255 will be incorrectly mapped to a mask with all bits set.

This fixes the issue in here https://fogbugz.unity3d.com/f/cases/1256220/

For QA: I tested the repro project and played around a bit with layers and all seems working now.

Copy link
Contributor

@TomasKiniulis TomasKiniulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid! Unused layers do not act as being affected by all light sources now

@sebastienlagarde sebastienlagarde merged commit 5fc0186 into HDRP/staging Jul 2, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/fix-issue-with-light-layers-and-deferred branch July 2, 2020 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants