Skip to content

A series of examples written while learning about WebGPU

License

Notifications You must be signed in to change notification settings

AlexandruPopovici/webgpu-experiments

 
 

Repository files navigation

WebGPU Experiments

A series of examples written while learning about WebGPU: a glTF viewer, a web-based LiDAR viewer, and a data-parallel Marching Cubes implementation using compute shaders. The glTF viewer uses a custom glb importer to load data efficiently into WebGPU and supports the basic glTF features. The LiDAR viewer uses LAStools.js, a version of libLAS compiled to Web Assembly, to load las and laz files directly in the browser. The Marching Cubes example is a data-parallel implementation of marching cubes written using compute shaders to leverage GPU compute for interactive isosurface extraction. If you have a browser with WebGPU enabled, you can try them out: glTF Viewer, LiDAR Viewer, Marching Cubes.

Triangle & Generated Triangle

Basic demos of rendering a triangle, or generating one and the draw calls in a compute shader.

triangle image

GLB Viewer Try it out!

A binary glTF viewer supporting static scenes with multi-level instancing, different materials, and textures.

sponza

Marching Cubes Try it out!

A data-parallel implementation of Marching Cubes using compute shaders. Note that as of 5/7/2020 some functionality (3D texture uploads) is not implemented in WebGPU which would make this easier to implement or include some other features (e.g., sampling the volume, adding volume rendering),

isosurface on the Skull data set

LiDAR Viewer Try it out!

A viewer for las/laz files. Uses LASTools.js to load las/laz files directly in the browser, and renders them as instanced billboard quads. To run this demo, download the LASTools.js release (liblas.js, liblas.wasm, liblas_wrapper.js) and place them under js/.

Morro Rock

About

A series of examples written while learning about WebGPU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 87.7%
  • HTML 5.9%
  • GLSL 3.2%
  • Python 3.2%