Skip to content

[Draft] Sg/color property to match inline #90

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

Closed
wants to merge 20 commits into from

Conversation

marctem
Copy link
Contributor

@marctem marctem commented Apr 9, 2020

Summary:

Fix for https://fogbugz.unity3d.com/f/cases/1184248/
Presumably Zack's last fix for the bugs listed inside the January Quality Drive document

Was caused by the fact that ColorNodes had a 'IsGammaSpace() ?' check and the Color Properties did not.
The bug thinks that the Inline node was incorrect. That is incorrect; Inline had it right: they were using a very intense color node (may want to explain that to them when we close the bug).

Was approved by docs, QA, and dev in SRP repo.

Update:

Since Color.hlsl (in render-pipelines.core) already does SRGBToLinear(real4 c) -> return real4(SRGBToLinear(c.rgb), c.a), made the CodeNode version have parity, making things simpler and more readable in the generated code (no difference in the generated shader assembly is confirmed).

To Optimize, or to Not Optimize..?:

Feels like we should change both this and the Color node to use https://docs.unity3d.com/ScriptReference/QualitySettings-activeColorSpace.html
If we find a way to cause the Shaders to rebuild if the setting is changed.
Discussion: https://unity.slack.com/archives/G7HQCPV71/p1579226248050000

My current thought is that we should do that for 2020, but backport this change to 19.3

Manually Tested:

  • That the bug no longer reproduces
  • My other SGs still seem to work fine
  • Checked this in sub graphs real quick

Technical Risk: 0/4: Simple single line change that other nodes are already using
Halo Effect: 2/4: This does affect color properties everywhere...

Notes to QA:

I was going to make a build of this, I didn't get around to it tonight (whether or not that's important, I have no reason to think so... but who knows)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to the Unity SRP repo!
Please make sure to fill out the PR template as best you can to give reviewers as much information as possible.
If you have any questions (and you are a Unity employee) go to "#devs-renderpipe"

@alindmanUnity alindmanUnity marked this pull request as draft May 12, 2020 17:33
@alindmanUnity alindmanUnity changed the title Sg/color property to match inline [Draft] Sg/color property to match inline May 12, 2020
@alindmanUnity
Copy link
Contributor

Converted to draft as it needs more review for upgrading

@alindmanUnity
Copy link
Contributor

closing in favor of #1413

@sebastienlagarde sebastienlagarde deleted the sg/color-property-to-match-inline branch September 1, 2021 10:23
mohammad22 pushed a commit that referenced this pull request May 25, 2022
…ng light. If we do not early out unity throws the error: No valid shadow casters (#90)
mohammad22 pushed a commit that referenced this pull request May 27, 2022
…ng light. If we do not early out unity throws the error: No valid shadow casters (#90)
mohammad22 pushed a commit that referenced this pull request May 31, 2022
…ng light. If we do not early out unity throws the error: No valid shadow casters (#90)
mohammad22 pushed a commit that referenced this pull request Oct 19, 2022
…ng light. If we do not early out unity throws the error: No valid shadow casters (#90)

No valid shadow casters error fix (#91)

* Fix GetShadowCasterBounds check
mohammad22 pushed a commit that referenced this pull request Oct 21, 2022
* Native collection leak fix

* IsFromVisibleList improvement

Add null guards to HDProcessedVisibleLightsBuilder light count accessor functions. m_ProcessVisibleLightCounts is not allocated until BuildVisibleLightEntities(), but the counts can be queried outside of the lightloop, before build - in particular inside of HDAdditionalLightData::WillRenderShadowMap() (#77)

Fixed rejecting of hidden lights in the light list. (#78)

dont skip if shadow update mode is on demand (#81)

Process both Visible and Dynamic GI lights at the same time (#82)

* Process both Visible and Dynamic GI lights at the same time

* Removed (unused) directional DGI lights

* Removed (unused) LightVolumeType array

Consider all offscreen lights when building DGI light data (#86)

* Consider all offscreen lights when building DGI light data

* Prefilter offscreen lights to only process DGI-enabled ones

* Requested changes from PR comments

* Improved duplicate DGI light detection

* Removed some GC allocations

* Keep a list of DGI-enabled lights so we don't have to check every frame

* Bugfix: allDGIEnabledLights isn't a superset of cullResults.visibleLights anymore

* Keep the list of DGI lights from HDAdditionalLightData sorted so it's even cheaper to find duplicates

Handle case when no valid shadow casters overlap a given shadow casting light. If we do not early out unity throws the error: No valid shadow casters (#90)

No valid shadow casters error fix (#91)

* Fix GetShadowCasterBounds check
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