KhronosGroup / OpenGL-Refpages

OpenGL and OpenGL ES reference page sources, and generated HTML used as backing store for khronos.org
424 stars 131 forks source link

Update minimum GLSL version of 'isinf' to 1.3 #109

Closed johnstiles-google closed 2 years ago

johnstiles-google commented 2 years ago

isinf doesn't appear in the GLSL spec until 1.3.

https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.1.20.pdf https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.1.30.pdf

In practice this is enforced by some GLSL implementations (#version 110 will produce a shader which cannot call isinf)

johnstiles-google commented 2 years ago

Reviewing the docs carefully, it also appears that isinf() in GLSL 1.3 is allowed to ignore its input and arbitrarily return false if the hardware does not support infinity. This caveat was only lifted in GLSL 3.3. Should the description mention this? Feels like an important distinction ("exists" vs "works").

johnstiles-google commented 2 years ago

Duplicate of #107