shade with debug colors for inf/nan values
This does not work currently. The glsl isinf() and isnan() functions are not consistently working as expected across various platforms (observed on macOS M3 Pro openGL version: 4.1 Metal - 88.1).
For now, this cannot be merged, but if anyone knows more about crossplatform glsl and wants to suggest a fix that would be welcome!
Checkout: https://sakibsaikia.github.io/graphics/2022/01/04/Nan-Checks-In-HLSL.html
GLSL also uses IEE-754 for floating point representation. See: https://www.khronos.org/opengl/wiki/Data_Type_(GLSL)
If you check for mantissa and exponent bits:
All 8 exponent bits as 1 + all mantissa bits as 0 signify inf,
while all 8 exponent bits as 1 + non-zero mantissa signify nan.