Add minimum splat size to GetMajorAxes

This commit is contained in:
2026-03-20 23:55:40 +08:00
parent e9819ca6cc
commit e774cc6663
@@ -1,3 +1,5 @@
#define EPSILON 0.0004f
/// Hidden
float CrossProduct(float2 A, float2 B)
{
@@ -42,5 +44,15 @@ float4x4 GetMajorAxes(float4x4 Axes, float4x4 AxesProjections)
result[1].xyz = z_axes;
}
if (length(result[0].xyz) < 0.0004)
{
result[0].xyz = normalize(result[0].xyz) * EPSILON;
}
if (length(result[1].xyz) < 0.0004)
{
result[1].xyz = normalize(result[1].xyz) * EPSILON;
}
return result;
}