Skip to content

Commit ef4ac3d

Browse files
Mikkel SimonsenEvergreen
authored andcommitted
[UUM-92200] Force SafeNormalize when blending DBuffer normals
1 parent 31eac92 commit ef4ac3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Packages/com.unity.render-pipelines.universal/ShaderLibrary

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void ApplyDecal(float4 positionCS,
139139
// Always test the normal as we can have decompression artifact
140140
if (decalSurfaceData.normalWS.w < 1.0)
141141
{
142-
normalWS.xyz = normalize(normalWS.xyz * decalSurfaceData.normalWS.w + decalSurfaceData.normalWS.xyz);
142+
normalWS.xyz = SafeNormalize(normalWS.xyz * decalSurfaceData.normalWS.w + decalSurfaceData.normalWS.xyz);
143143
}
144144
#endif
145145

0 commit comments

Comments
 (0)