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

Re: [Public WebGL] Feature proposal for TypedArrays

Why was this sent as a reply if it's a new proposal? It makes the threads very confusing.

On May 10, 2010, at 8:44 AM, tomi.aarnio@nokia.com wrote:

Hi all,
I’d like to propose a new feature for TypedArrays, namely support for the ‘half’ datatype, also known as fp16.
Although the half datatype is not strictly required for core WebGL, there are several widely deployed OES extensions that do require it; seehttp://www.khronos.org/registry/gles/. It’s also universally supported on desktop GPUs (required by OpenGL 3.0 and later), and part of the IEEE 754-2008 standard. And of course, it’s immensely useful in saving memory space and bandwidth in cases where fp32 precision and range would be overkill.

We don't support any of those extensions. I can see a future where fp16 would be a somewhat useful data type. But in our case we would have to convert from doubles to fp16, which I believe would have to be done in software on most platforms. Alternatively, data in this format could be loaded as bytes and then mapped to fp16. That would be efficient, but I'm not convinced it would be worth if for vertex data. 

I can see it being very useful with floating point textures and perhaps even depth buffers. But it seems like overkill for now.

I believe the extra effort to support fp16 in TypedArrays would be minimal, considering that FP32 and FP64 are already supported.

But fp32 and fp64 are supported in compilers and hardware FPUs. I don't know of any CPU's that support fp16 natively. So full support would require conversion to and from a support FP format. I don't think it's worth doing that at this point.