WebGPU is coming to Babylon.js

Hello Community,

It has been a while I was off from the community but mainly for the greater good :slight_smile:

I have been working on an early support for WebGPU in Babylon.js: David Catuhe on Twitter: "Yeah!!! #babylonjs featured during #GoogleIO2019 for our initial support for #webGPU More info here: https://t.co/vTNt66gYwX (including source, demos and even documentation :D) Thanks a lot @DaKangzā€¦ https://t.co/NWIpKoRmYj"

About the article you can find the Google I/O presentation related to the announcement here: YouTube with highlights of our amazing community at:

5:17 - 5:33 Babylon callout By the author of ThreeJS on WebGL :blush:
17:30 - 20:05 for the Babylon.js WebGPU part

Hope you will enjoy it as much as we did

29 Likes

This is goin to be great. One day if we dont have to support 5 years old crappy hardware.

1 Like

Great news! :slight_smile:

1 Like

IM
PRES
SI
VE !!!

:blush:
congratulations !!!

1 Like

Great! :sunglasses: ā€œThe futureā€™s so bright, I have to wear shadesā€

1 Like

Fantastic news :sunny:

Canā€™t wait to play with this. Congrats :tropical_drink:

Interesting! That performance gain sounds attractive :smiley:

Just out of curiosity, why the webGPU dev starts on Mac?

I am so confused, I thought the ā€œfutureā€ was about WebAssembly, and now there is ā€œWebGPUā€?

Would someone mind explaining a little bit, in few words, whatā€™s the difference? :slight_smile: (going to google it meanwhile)

EDIT: and what about Vulkan? donā€™t they do a web version?
EDIT 2: Re: why not a WebVulkan, see NXT, a prototype WebGL Next - Google Docs
EDIT 3: Re: WebAssembly and WebGPU, the difference seems to be that the first one is about going closer to the CPU, while the second is about going closer to the GPU, am I right?

1 Like

Woooooow. I am so excited about this. So good to hear this news.

I am not sure if this is a stupid question. But will this somewhat enable implementing raytracing within the Babylon?

1 Like
  • WebAssembly is a bytecode executed CPU side. It can replace some parts of JS by running faster (JS is still needed because only it can access to the DOM canvas and run the WASM process)
  • WebGPU is the next API coming after WebGL to access the GPU. AFAIK, itā€™s still a W3C draft and uses some of the work already done by the Vulkan project, but also Direct3D or Apple Metal.
6 Likes

Because most of the google devs are on Chrome :slight_smile:

3 Likes

Ahah ok, but Chrome also works on Linux & Windows

Yes and WebGPU will come to these OS soon!

3 Likes

From my understanding:

WebGPU is a standard in making. There was 3 proposals from Mozilla, Apple and Google. The Apple one formerly named WebGPU, now WebMetal, was chosen as the starting point for the spec (maybe because it had best xplatform abstraction?). I think that is the main reason for WebGPU development coming first to Mac.

Chrome is using a project called Dawn, which ā€˜translatesā€™ WebGPU to Vulkan/D3D12/Metal respectively on different platforms (and this is why we have WebGPU and not WebVulkan - as Vulkan does not run on Mac/iOS). In a sense you can compare Dawn to what ANGLE did for WebGL (translate to DirectX).

Hope this makes sense :slight_smile:

2 Likes

:black_heart: Likes:

  • non redundant memory load and shared memory load on GPU

  • freed up CPU cycles for logic rendering

  • hybrid 2D (cpu) + 3D (gpu) concept at 6:00 :star: (double-like) :star:

    [we try to push that envelope - lots of 2dtxt with 3danm - simultaneous]

  • Cnns, TensorFlow, GPU computeā€¦


  • New GPU Algorithms! : )

ā€œmany more algorithms uploaded from JS to GPU.ā€

What might those ā€œnew JS to GPU algorithmsā€ be?

Or what experiments might help?

Fluid dynamics, particles2.0, and ā€¦ hair!?! :grin:


LINK: webgpu.io

  • stand clapping ā†’ babylon.js :clap:
1 Like

This is going to be awesome! No more limit in fluidity, rapidity for always more creativity! :rainbow::rainbow::rainbow::rainbow:

Even postprocesses will benefit from it! :heart_eyes::heart_eyes::heart_eyes::heart_eyes:

The face of internet will soon change and this is thanks to you guys! :raised_hands::raised_hands::raised_hands::raised_hands:

1 Like

Wonderful news ! Now I have to go rewrite my design specsā€¦

Any idea if webgpu will impact texture loading times or texture size limitations ? Iā€™d love to work in the 4k zones. Eyeballing the demos and samples, there doesnā€™t seem to be anything on textures.

Do you think Babylon will be able to detect that the browser support WebGPU and use the right APIs? if so it can be used before Apple will finally to more their asses.
I assume that if itā€™s already in chrome canary version it might not be that long before it gets to production.

@sebavan youā€™re really making a wonderful job, first tree-shaking and now this. :+1:

1 Like

Thanks a lot !!! I guess we ll wait for full stabilization and feature parity before automatically move to webgpu if available.

My target is feature parity in 4.1 in the limit of what GPU provides plus support for compute shaders and command buffer reuse :slight_smile:

1 Like