Skip to content

WebGPU renderer path

Use this page to confirm that shapes and the render loop behave correctly when the WebGPU HAL is selected. It complements the initialization and plugin topics in Lesson 1 and the performance notes in Lesson 8.

If WebGPU is unavailable in the browser, fall back to WebGL and compare frame cost or visual parity.

Interactive demo

Just use renderer="webgpu" to enable WebGPU.

html
<ic-canvas renderer="webgpu"></ic-canvas>

If you don't set shaderCompilerPath, it will use the default shader compiler 'https://unpkg.com/@antv/[email protected]/dist/pkg/glsl_wgsl_compiler_bg.wasm'.

html
<ic-canvas
    renderer="webgpu"
    shaderCompilerPath="/your/path/to/glsl_wgsl_compiler_bg.wasm"
></ic-canvas>

Released under the MIT License.