WebGPU WebGPU is an exciting new API for the web Through the WebGPU API you gain access to specialist graphical capabilities specifically those that are available using Direct 12 Metal and Vulkan These capabilities are for more than performing rendering but open the doorway to any massively parallel computational operations by leveraging the power of your graphics processing unit GPU img width 95 src https notebook xbdev net var images imglF16MxJneQGT jpg You can t use WebGPU yet almost To have a try using WebGPU during its trial development stages you need to enable it via the browser flags Enabling via about flags To experiment with WebGPU locally without an origin trial token enable the enable unsafe webgpu flag in about flags Before you even get started The first thing to do before you even try starting to code a WebGPU application is to check that your browser actually supports has the capabilities installed You can do a simple feature detection To check if WebGPU is supported use if gpu in navigator WebGPU is supported Security You can never be too careful To ensure a web page can only work with its own data all the commands are strictly validated before they reach the GPU Read the malicious use considerations section of the WebGPU specification online to learn more about the security tradeoffs regarding driver bugs for instance if gpu in navigator console log WebGPU is supported else console log WebGPU not supported
Before you even get started The first thing to do before you even try starting to code a WebGPU application is to check that your browser actually supports has the capabilities installed You can do a simple feature detection To check if WebGPU is supported use if gpu in navigator WebGPU is supported Security You can never be too careful To ensure a web page can only work with its own data all the commands are strictly validated before they reach the GPU Read the malicious use considerations section of the WebGPU specification online to learn more about the security tradeoffs regarding driver bugs for instance if gpu in navigator console log WebGPU is supported else console log WebGPU not supported