Skip to content

Commit 01c3d64

Browse files
GLTF Viewer: normalize normal for SSR
1 parent e3615bd commit 01c3d64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Samples/GLTFViewer/src/GLTFViewer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ struct PSOutput
384384
// This way when the factor is 0.0, we get the base layer, when it is 1.0,
385385
// we get the clear coat, and something in between otherwise.
386386
387-
PSOut.Normal.xyz = lerp(PSOut.Normal.xyz, Shading.Clearcoat.Normal, Shading.Clearcoat.Factor);
387+
PSOut.Normal.xyz = normalize(lerp(PSOut.Normal.xyz, Shading.Clearcoat.Normal, Shading.Clearcoat.Factor));
388388
PSOut.MaterialData.xy = lerp(PSOut.MaterialData.xy, float2(Shading.Clearcoat.Srf.PerceptualRoughness, 0.0), Shading.Clearcoat.Factor);
389389
PSOut.BaseColor.xyz = lerp(PSOut.BaseColor.xyz, float3(1.0, 1.0, 1.0), Shading.Clearcoat.Factor);
390390

0 commit comments

Comments
 (0)