<div dir="ltr">Raytracing on mouse-up, or real-time raytracing.<div>Large calculations on images at runtime, for GIS-like applications.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 15, 2023 at 4:03 AM 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Thanks. True, the first step may be to translate webGL2 code to WebGPU in a 1:1 manner, with some helpers or wrappers.</div><div dir="auto"><br></div><div dir="auto">Since frameworks such as threejs or Babylonjs already have WebGPU support in parallel to WebGL2 it will make sense to look at those for such a translation.</div><div dir="auto"><br></div><div dir="auto"> My understanding is that webGL2 will be supported for an extended period of time. So there will be time to understand better how WebGPU could be leveraged best.</div><div dir="auto"><br></div><div dir="auto">For example, a major difference is that WebGPU does not have global state. Sharing resources may be more important. Speculating, in terms of X3D it may mean that it would more appropriate to collect all textures in an indexed node and then refer to them by index as needed.</div><div dir="auto"><br></div><div dir="auto">Andreas</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br><div dir="auto">---on the phone---</div><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, Jul 15, 2023, 2:59 AM John Carlson <<a href="mailto:yottzumm@gmail.com" rel="noreferrer noreferrer" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" rel="noreferrer noreferrer noreferrer" target="_blank">andreasplesch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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 noreferrer noreferrer 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" rel="noreferrer noreferrer noreferrer" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>
</blockquote></div></div></div>
_______________________________________________<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>