WebGPU basic examples

What is WebGPU?

WebGPU is a modern web standard for GPU computing and graphics, released in 2023 after 6+ years of development by W3C. It's the successor to WebGL (2011), which was based on OpenGL ES 2.0—a mobile graphics API from 2007.

Why WebGPU was created:

Is it mature?

Should you use WebGPU or WebGL?

Why use WebGPU at all?

Bottom line: WebGPU is the modern, standard choice for web-based GPU work. It's production-ready in Chrome/Safari and actively replacing WebGL in major applications.

01 - Hello GPU

Initializing WebGPU...

02 - Canvas Triangle

Rendering triangle...

03 - Rotating Triangle

Starting animation...

04 - Rotating Cube (3D)

Rendering 3D cube...

05 - WGSL Language Reference

Loading reference guide...