Skip to content

visionary-3d/webgpu-faq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

WebGPU :: Javascript at the speed of Light

This is the FAQ Readme file for the video down below.

Corrections of mistakes in the video is pinned in the comments section of the video.

WebGPU Compute Shaders Introduction

FAQ

Where does WebGPU code even run?

Images are always better than words: image

Capturing the WebGPU ecosystem Article

How am I measuring gpu compute time ?

I'm using a special flag in chrome which allows me to use some timer tools:

--enable-dawn-features=allow_unsafe_apis

You can learn more about how to use this flag here: GPU Timer Tool For WebGPU

Can WebGPU be used for native mobile or desktop apps?

Yes. You can write C++ or Rust code to create native applications with WebGPU. However support for some browsers and specially mobile browsers is Work In Progress at the moment.

What exactly are the advantages of WebGPU vs ThreeJS + WebGL ?

  1. Biggest one in my opinion is compute shaders. Compute shaders allow you to run you shader in parallel on the gpu but they're way more flexible and more general purposed than VS and FS shaders. Before, you could do what you can do in compute shaders in normal Fragment shaders, but that was much more difficult to do. So ease of use is a key factor.

  2. WegGL is an ugly mess. WebGPU is a fantastic upgrade and has a way simpler API.

  3. WebGPU is built on top of Vulkan ( for windows ) and Metal ( for mac ) I beleive. Vulkan has some really nice features for Raytracing as far as I'm aware of and so, we're going to have a RayTracingPipeline further down the line.

How much easier would it be to start with the framework like Babylon.js instead of trying to understand the WebGPU ?

It's not that different at the moment. And I highly recommend learning WebGPU itself.

Releases

No releases published

Packages

No packages published