Files
wgpu/examples
6464852226 Merge #401 #402
401: Readme updates about the Gecko branch r=grovesNL a=kvark



402: Re-enable auto-deploy from gecko branch r=kvark a=grovesNL

As mentioned on Matrix, the `gecko` branch should be safe to use for auto-deployment to GitHub pages for the wgpu-rs examples on wasm.

We can use the `gecko` branch for now and eventually switch back to `master`.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-06-21 00:23:05 +00:00
..

Structure

For the simplest examples without using any helping code (see framework.rs here), check out:

  • hello for printing adapter information
  • hello-triangle for graphics and presentation
  • hello-compute for pure computing

Notably, capture example show rendering without a surface/window. It reads back the contents and saves them to a file.

All framework-based examples render to the window.

Feature matrix

Feature boids cube mipmap msaa-line shadow skybox texture-arrays water
vertex attributes ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐
instancing ⭐
lines and points ⭐
sampled color textures ⭐ ⭐ ⭐ ⭐ ⭐ ⭐
storage textures ⭐
binding array ⭐
comparison samplers ⭐
subresource views ⭐ ⭐
cubemaps ⭐
multisampling ⭐
off-screen rendering ⭐ ⭐
stencil testing
depth testing ⭐ ⭐
depth biasing ⭐
read-only depth ⭐
blending ⭐
render bundles ⭐ ⭐
compute passes ⭐
optional extensions ⭐
- binding indexing ⭐
WGSL shaders

Hacking

You can record an API trace any of the framework-based examples by starting them as:

mkdir -p trace && WGPU_TRACE=trace cargo run --features trace --example <example-name>