WebGPU is coming to Babylon.js

webgpu
#1

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

22 Likes
#2

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

1 Like
#3

Great news! :slight_smile:

#4

IM
PRES
SI
VE !!!

:blush:
congratulations !!!

#5

Great! :sunglasses: “The future’s so bright, I have to wear shades”

1 Like
#6

Fantastic news :sunny:

Can’t wait to play with this. Congrats :tropical_drink:

#7

Interesting! That performance gain sounds attractive :smiley:

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

#8

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
#9

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

#10

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

1 Like
#11
  • 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.
4 Likes
#12

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

1 Like
#13

Ahah ok, but Chrome also works on Linux & Windows

#14

Yes and WebGPU will come to these OS soon!

2 Likes
#15

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
#16

: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:
#17

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
#18

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.

#20

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
#21

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