<div dir="ltr">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.<div><br></div><div>On the other hand, GPU Group specifically drew the boundary for unified number use before the GPU, eg. limited to CPU.</div><div><br></div><div>Games may be the most performance sensitive area for X3D, and mobile.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><div><br></div><div>-Andreas<br><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 6, 2018 at 2:36 PM, Michalis Kamburelis <span dir="ltr"><<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> 2018-04-06 19:14 GMT+02:00 Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>>:<br>
> That came to mind as well, since js numbers are doubles. May be it is time<br>
> to trade less efficient use of resources for simplicity and convenience ?<br>
<br>
Note that JavaScript *has* native 32-bit floats when it comes to<br>
lists: Float32Array . And I bet that Float32Array is used in X3DOM<br>
internally for rendering :) WebGL API (bufferData), and three.js on<br>
top of it, use Float32Array for their data.<br>
<br>
Regards,<br>
Michalis<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div>
</div>