[11.x] URP Shadergraph Fog Node should return fog intensity as density output#400
[11.x] URP Shadergraph Fog Node should return fog intensity as density output#400Looooong wants to merge 1 commit into
Conversation
|
Sorry for taking a long time to review. However, it changes the existing look and also flips the correct input parameter order for the lerp mixing the fog with material color. |
|
I have added a changelog entry. |
|
Adding @alindmanUnity as this is for shader graph. |
|
just an update, because this changes the output from previous behavior we need to have an upgrade path for this node, as well as upgrade documentation, before we can accept the change. Shader Graph team is stretched a little thin, so this might take a while to be addressed unless the fix is raised as high priority. |
alindmanUnity
left a comment
There was a problem hiding this comment.
We need to add an upgrade path for this change in behavior before it can be merged.
|
Closing due to inactivity. If you are still working on it, please reopen PR again. |
Guide : https://github.com/Unity-Technologies/Graphics/blob/pr-template-correction/.github/pr-read.png.md
Display Addon : https://userstyles.org/styles/182991/unity-graphics-pr-readme
Purpose of this PR
In the URP, the Fog Node in Shadergraph outputs
densityusing the result ofComputeFogFactor(z). However, the fog factor cannot be used mix fog color with fragment color. Instead, it must be passed toComputeFogIntensity(fogFactor)to compute fog intensity, then this value is used to mix fog color with fragment color (this is howMixFogColor(fragColor, fogColor, fogFactor)is implemented). Therefore, instead of using fog factor, I suppose that Fog Node in Shadergraph should return fog intensity asdensityoutput. This will allow developer/designer to mix fog color using Lerp Node.Testing status
Manual Tests
Automated Tests
Links
Yamato: (Select your branch) https://yamato.prd.cds.internal.unity3d.com/jobs/902-Graphics
Comments to reviewers