Following the specification from the GPU for the Web Working Group, we have begun the journey to support this new technology. Our plan is to deliver support with WebGPU and WebGL feature parity in Babylon 5.
Benefits of WebGPU
Some features WebGPU brings to the table are:
- Compute shaders
- Ray tracing (in-progress)
- Improved performance across the board
- and more...
See the dedicated progress page.
You can also follow our progress on out GitHub dedicated issue.
The current implementation of WebGPU is now merged in the main branch of the Babylon.js GitHub repository.
We are putting in a big effort alongside our next release to implement full support. Every contribution is more than welcome, so feel free to create a PR if you are interested in contributing to the future of high performance game development on the web.
Even if we are now far into the development process, we are still subject to potential changes as well as specification uncertainties. We will handle these changes one at a time but as a result we may have to adjust the release schedule accordingly.
We have the full support from the amazing teams implementing the WebGPU into the browsers, so we can work together as needed to make development smoother for all.
Migration of Existing Games and Apps
As backwards compatibility is one of our pillars, the only difference we wish to have is with the engine initialization which needs to be asynchronous:
const engine = new BABYLON.WebGPUEngine(canvas);await engine.initAsync();
Will WebGL still be supported?
Yes! Support for WebGL and WebGPU will be maintained side by side for the foreseeable future.
You can refer to this page for detailed information on browser support.
Assuming you're using a browser that supports WebGPU, you can try it out yourself in the Playground
Follow the status from the dedicated Chrome Status Platform Page.
All demo code is available on Github, so you can compare both the WebGL and WebGPU versions and take notice that there are currently no differences beside initialization. We will try to keep it this way. :-)