Skip to content

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