[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Should GLfloat and GLclampf be typedefs for "unrestricted float"?



I point it out because once the color buffer extension becomes available, the clamping tests will need reworking. Currently WebGL clamps regardless. The reason for that is that in Desktop GL you have to specify clamps explicitely, and unless you release them, ranges are clamped. However in  ES the clamping behavior is derived from the drawing target. So an implementation that observes the spec on Infinity, -Infinity and NaN, which is right next to the clamping settings, would have to explicitely observe the target and do the right thing on Desktops (on mobiles it's just pass trough).


On Mon, Nov 19, 2012 at 2:41 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
On 11/19/12 8:33 AM, Florian Bösch wrote:
Note that the ES 2.0 specifications clamping behavior is modified by
http://www.khronos.org/registry/gles/extensions/EXT/EXT_color_buffer_half_float.txt in
that output, blend and clear clamps are removed when the target is
floating point.

I'm not sure how relevant this is to my question...  The question, in case it wasn't clear, is whether passing Infinity, -Infinity, and NaN to various floating-point things in WebGL should throw at the binding level or whether it should pass through the argument as-is to the underlying WebGL implementation (which could then still choose to throw, if the throwing behavior needs to be conditional on something like which extensions are in use).

-Boris