Add minimum splat size to GetMajorAxes
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
#define EPSILON 0.0004f
|
||||||
|
|
||||||
/// Hidden
|
/// Hidden
|
||||||
float CrossProduct(float2 A, float2 B)
|
float CrossProduct(float2 A, float2 B)
|
||||||
{
|
{
|
||||||
@@ -42,5 +44,15 @@ float4x4 GetMajorAxes(float4x4 Axes, float4x4 AxesProjections)
|
|||||||
result[1].xyz = z_axes;
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user