Skip to content

tsherif/webgpu-examples

gh-pages
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
css
 
 
img
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WebGPU Examples

Small examples of SPIR-V compatible WebGPU usage.

  • Blank: Setting up a swap chain and clearing the canvas.
  • Point: Creating a pipeline and drawing a single point.
  • Triangle: Creating vertex buffers and drawing a triangle.
  • Cube: Creating vertex and uniform buffers, and animating a cube.
  • Textured, Lit Cube: Creating a texture from a DOM image, setting up vertex and uniform buffers, and animating a cube.
  • Particles: Simulating gravity on instanced particles using a compute shader.

Examples currently only run in Chrome Canary with the enable-unsafe-webgpu flag set. See the Implementation Status page for updates on support.

All examples are implemented as simple HTML pages and can thus be run locally by serving them from a local HTTP server, e.g. python -m SimpleHTTPServer.

About

Small examples of SPIR-V compatible WebGPU usage.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published