Skip to content

Commit a744dc0

Browse files
arttu-peltonenEvergreen
authored andcommitted
Add missing DEBUG_DISPLAY check to MixFogColor
1 parent d20c73d commit a744dc0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderVariablesFunctions.hlsl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,12 @@ half3 MixFogColor(half3 fragColor, half3 fogColor, half fogFactor)
470470

471471
if (anyFogEnabled)
472472
{
473-
half fogIntensity = ComputeFogIntensity(fogFactor);
474-
// Workaround for UUM-61728: using a manual lerp to avoid rendering artifacts on some GPUs when Vulkan is used
475-
fragColor = fragColor * fogIntensity + fogColor * (half(1.0) - fogIntensity);
473+
if (IsFogEnabled())
474+
{
475+
half fogIntensity = ComputeFogIntensity(fogFactor);
476+
// Workaround for UUM-61728: using a manual lerp to avoid rendering artifacts on some GPUs when Vulkan is used
477+
fragColor = fragColor * fogIntensity + fogColor * (half(1.0) - fogIntensity);
478+
}
476479
}
477480
return fragColor;
478481
}

0 commit comments

Comments
 (0)