Skip to content

Commit

Permalink
[Port] [2022.3] [Vulkan][URP] Fix linear fog rendering artifacts on A…
Browse files Browse the repository at this point in the history
…dreno GPUs with Vulkan

Jira: https://jira.unity3d.com/browse/UUM-61728
Read the Comments to Reviewers section.
  • Loading branch information
svc-reach-platform-support authored and Evergreen committed Aug 9, 2024
1 parent 121de4a commit 3fae7bb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ half3 MixFogColor(half3 fragColor, half3 fogColor, half fogFactor)
{
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
half fogIntensity = ComputeFogIntensity(fogFactor);
fragColor = lerp(fogColor, fragColor, fogIntensity);
// Workaround for UUM-61728: using a manual lerp to avoid rendering artifacts on some GPUs when Vulkan is used
fragColor = fragColor * fogIntensity + fogColor * (half(1.0) - fogIntensity);
#endif
return fragColor;
}
Expand Down

0 comments on commit 3fae7bb

Please sign in to comment.