hlsl - isinf() not working as expected? 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? https://ift.tt/eA8V8J
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?
from GameDev.net http://bit.ly/2MC3lGW
from GameDev.net http://bit.ly/2MC3lGW
ليست هناك تعليقات