[x3d-public] remove SF/MFInt32 ?

Andreas Plesch andreasplesch at gmail.com
Fri Apr 6 12:06:25 PDT 2018


Yes, you are right, of course. Float32Arrays are used in x3dom to pass data
to webgl. BTW, x3dom does not use three.js, I believe mostly for historical
reasons.

On the other hand, GPU Group specifically drew the boundary for unified
number use before the GPU, eg. limited to CPU.

Games may be the most performance sensitive area for X3D, and mobile.

Another way to think about this, is to consider if it is feasible to not
have SFDouble in X3D. They are rarely used and the GPU does not really
support them. Doubles would be really useful for  the geospatial component
since you want cm resolution on a global scale but due to the GPU
restriction it is necessary anyways to introduce a special local origin
(geoOrigin).

Then if there are no doubles, then there may be only a SFRealNumber type
and it could be left to the discretion of the browser to use floats or
doubles for the work.

-Andreas


On Fri, Apr 6, 2018 at 2:36 PM, Michalis Kamburelis <
michalis.kambi at gmail.com> wrote:

>  2018-04-06 19:14 GMT+02:00 Andreas Plesch <andreasplesch at gmail.com>:
> > That came to mind as well, since js numbers are doubles. May be it is
> time
> > to trade less efficient use of resources for simplicity and convenience ?
>
> Note that JavaScript *has* native 32-bit floats when it comes to
> lists: Float32Array . And I bet that Float32Array is used in X3DOM
> internally for rendering :) WebGL API (bufferData), and three.js on
> top of it, use Float32Array for their data.
>
> Regards,
> Michalis
>



-- 
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180406/e9c196cd/attachment.html>


More information about the x3d-public mailing list