|
|
|
|
|
|
return faceID; |
|
|
|
} |
|
|
|
#endif // INTRINSIC_CUBEMAP_FACE_ID |
|
|
|
|
|
|
|
// Intrinsic isnan can't be used because it require /Gic to be enabled on fxc that we can't do. So use IsNAN instead |
|
|
|
bool IsNAN(float n) |
|
|
|
{ |
|
|
|
return (n < 0.0 || n > 0.0 || n == 0.0) ? false : true; |
|
|
|
} |
|
|
|
|
|
|
|
bool IsNAN(float2 v) |
|
|
|
{ |
|
|
|
return (IsNAN(v.x) || IsNAN(v.y)) ? true : false; |
|
|
|
} |
|
|
|
|
|
|
|
bool IsNAN(float3 v) |
|
|
|
{ |
|
|
|
return (IsNAN(v.x) || IsNAN(v.y) || IsNAN(v.z)) ? true : false; |
|
|
|
} |
|
|
|
|
|
|
|
bool IsNAN(float4 v) |
|
|
|
{ |
|
|
|
return (IsNAN(v.x) || IsNAN(v.y) || IsNAN(v.z) || IsNAN(v.w)) ? true : false; |
|
|
|
} |
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------- |
|
|
|
// Common math functions |
|
|
|