Float16Array

Florian Bösch pyalot at gmail.com
Wed May 17 12:28:26 UTC 2017


Also keep in mind that Float16 is the only viable format for some
operations. Mobiles in particular may not support any or a combination of:

   - Basic (nearest, clamped, non mipmapped) Float32 textures
   - Linearly interpolating Float32 textures
   - Rendering to Float32 textures
   - Reading back Float32 textures
   - Repeating (ST) Float32 textures
   - Mipmapping Float32 textures
   - Not clamping (numerically between 0 and 1) Float32 textures

If your usecase requires any of these capabilities and you need to either
upload or readback the data, then there is no primitive you can use to
perform computations with the data in JS. The present day way this is
handled is you upload/readback UInt16 and then have conversion routines
that convert these to floating point values you can work with on the CPU or
convert back for use by the GPU.


On Wed, May 17, 2017 at 2:15 PM, T.J. Crowder <
tj.crowder at farsightsoftware.com> wrote:

> I'd missed that this was the continuation of a thread. Florian Bösch
> [started it](https://esdiscuss.org/topic/float16array#content-0) with
> interop in mind, in fact. So that makes sense.
>
> -- T.J. Crowder
>
>
>
> On Wed, May 17, 2017 at 1:12 PM, T.J. Crowder <
> tj.crowder at farsightsoftware.com> wrote:
>
>> On Wed, May 17, 2017 at 1:05 PM, Leo Balter <leonardo.balter at gmail.com>
>> wrote:
>>
>>> The current spec is based on IEEE 754 and matches the floating point
>>> specs. What would Float16 be based on?
>>>
>>
>> There's a binary16 format specified by IEEE-754 2008.
>>
>> But I agree with the "why" comment. 16-bit (aka "half precision") binary
>> floating point is not very useful here in 2017 except for interop (森建 -
>> is interop your motivation?)...
>>
>> I'd be much more interested to see support for the "new" (nine years ago)
>> decimal formats.
>>
>> -- T.J. Crowder
>>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170517/3bb05e82/attachment.html>


More information about the es-discuss mailing list