Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit a184bf0

Browse files
committed
Fixed random "internal compiler error"
1 parent 172e362 commit a184bf0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PostProcessing/Shaders/StdLib.hlsl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ float4 PositivePow(float4 base, float4 power)
150150
// /Gic isn't enabled on fxc so we can't rely on isnan() anymore
151151
bool IsNan(float x)
152152
{
153-
return (x <= 0.0 || 0.0 <= x) ? false : true;
153+
// For some reason the following tests outputs "internal compiler error" randomly on desktop
154+
// so we'll use a safer but slightly slower version instead :/
155+
//return (x <= 0.0 || 0.0 <= x) ? false : true;
156+
return (n < 0.0 || n > 0.0 || n == 0.0) ? false : true;
154157
}
155158

156159
bool AnyIsNan(float2 x)

0 commit comments

Comments
 (0)