Skip to content

Commit 03c3726

Browse files
author
kevyuu
committed
Fix normal calculation for counter clockwise
1 parent 39475b2 commit 03c3726

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

67_RayQueryGeometry/app_resources/render.comp.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ float3 calculateNormals(int primID, SGeomInfo geom, float2 bary)
5959
float3 v1 = vk::RawBufferLoad<float3>(vertexBufferAddress + indices[1] * 12);
6060
float3 v2 = vk::RawBufferLoad<float3>(vertexBufferAddress + indices[2] * 12);
6161

62-
return normalize(cross(v2 - v0, v1 - v0));
62+
return normalize(cross(v1 - v0, v2 - v0));
6363
}
6464

6565
float3 n0, n1, n2;

0 commit comments

Comments
 (0)