1#version 320 es 2precision highp float; 3out vec4 my_FragColor; 4void main() 5{ 6 // GLSL ES 3.00.6 section 4.1.4 Floats: 7 // "A value with a magnitude too small to be represented as a mantissa and exponent is converted to zero." 8 // 1.0e-50 is small enough that it can't even be stored as subnormal. 9 float correct = (1.0e-50 == 0.0) ? 1.0 : 0.0; 10 float correct1 = isinf(1.0e40) ? 1.0 : 0.0; 11 vec4 foo = vec4(1.0e-50, -1.0e-50, 1.0e50, -1.0e50); 12 my_FragColor = vec4(0.0, correct, correct1, 1.0); 13} 14