Closed GoogleCodeExporter closed 9 years ago
The GLSL ES specification makes very few guarantees about the actual precision
at which calculations are done, what precision results are stored at, and which
optimizations are allowed.
http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf
Section 4.5.2: "Implementations may use greater range and precision than
requested, but not less."
Section 4.6.2, Example 2: "There is no mechanism to enforce invariance between
a and b."
Section 10.30: "The precision of operations are [...] implementation dependent."
Section 10.31: "A specified set of [compiler] transforms (in addition to those
permitted by C++) are allowed."
In this case there's likely a compiler transform where 'b' is symbolically
determined to be be zero, and thus the operations are entirely eliminated. This
is valid since they are allowed to be performed at higher precision and thus
rounding errors would be eliminated.
Original comment by nicolas....@gmail.com
on 5 Mar 2013 at 2:31
Original issue reported on code.google.com by
okurt...@gmail.com
on 5 Mar 2013 at 10:25