I'm trying to clamp my NaNs and infs to 0 and I implemented as
float3 tmp = ...; // float3 value that need to clamp
bool colorsNan = any(isnan(tmp));
bool colorsInf = any(isinf(tmp));
tmp = (colorsNan||colorsInf) ? float3(0, 0, 0) : tmp;
However, after the clamping, there are still inf values. Is there anything wrong?
BTW, isnan() is working, so is it because the way isnan() works is different from isinf()?