Hi all,
I was wondering if anyone knows of a way to reliably test for NaN in GLSL ES 1. I tried using the following polyfill that I found in this
mesa bug ticket:
bool isnan_emu(float x) { return (x > 0.0 || x < 0.0) ? x != x : x != 0.0; }
This worked on the desktop devices I tested but failed an iPhone and an iPad. I created this
playground to try out different tests (the squares test whether a NaN attribute was correctly detected at low, medium, and high shader float precision, green == pass, red == fail).
Any help would be appreciated!
Tarek