<div dir="auto">Andreas, I didn’t read the whole article, but my first non-performant thought is to provide an ANGLE-like WebGL3 polyfill on top of WebGPU that makes initial porting easier. I realize there are new things in WebGPU we want to leverage that might be added to WebGL3.</div><div dir="auto"><br></div><div dir="auto">Not exciting, I realize.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 14, 2023 at 10:35 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Although X3D is a high level scene graph, it is influenced by OpenGL<br>
and many, perhaps all X3D browsers use OpenGL or the similar WebGL as<br>
an API to draw pixels.<br>
<br>
OpenGL is not updated anymore and other APIs are now dominant: Metal,<br>
Vulcan, Direct3D12 and now WebGPU. It is already available in most web<br>
browsers as an alternative to WebGL2. WebGPU is cross-platform, close<br>
to GPU instructions and can be very performant.<br>
<br>
Did anybody think about or actually try to use something other than<br>
OpenGL for X3D rendering ?<br>
<br>
It is time to start speculating and mind mapping how one would go<br>
about designing a new X3D browser which uses another low-level API.<br>
Ideally, X3D is abstract enough that the choice of graphics API does<br>
not matter much. But there are certainly many aspects that an<br>
implementation has to consider which depend on the low-level API, from<br>
the design stage to actual coding.<br>
<br>
<a href="https://webgpufundamentals.org/webgpu/lessons/webgpu-from-webgl.html" rel="noreferrer" target="_blank">https://webgpufundamentals.org/webgpu/lessons/webgpu-from-webgl.html</a><br>
has a detailed comparison between WebGL and WebGPU.<br>
<br>
WebGPU is lower level. One example mentioned above is ImageTexture.<br>
With WebGL it is possible to just change the source image for the<br>
texture, and everything else in the rendering process can stay the<br>
same. With WebGPU it is necessary to destroy the old texture, and<br>
rebuild a pipeline in case the ImageTexture is changed.<br>
<br>
A Shape corresponds to a draw call in WebGL. For WebGPU a Shape<br>
presumably still could correspond to a draw call but it is also<br>
possible to bundle all draw calls for a Scene and submit those in one<br>
call. That seems interesting but it is unclear how event flow may<br>
affect this option.<br>
<br>
Any experience with nonGL APIs may be insightful.<br>
<br>
Andreas<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>