For the simplest examples without using any helping code (see framework.rs
here), check out:
hello
for printing adapter informationhello-triangle
for graphics and presentationhello-compute
for pure computing
Notably, capture
example shows 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 | boids | cube | mipmap | msaa-line | shadow | skybox | texture-arrays | water |
---|---|---|---|---|---|---|---|---|
vertex attributes | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | ⭐ | |
instancing | ⭐ | |||||||
lines and points | ⭐ | |||||||
dynamic buffer offsets | ⭐ | |||||||
implicit layout | ⭐ | |||||||
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 | ⭐ | |||||||
- push constants | ⭐ | |||||||
- depth clamping | ⭐ | |||||||
- BCn compressed textures | ⭐ | |||||||
- polygon mode | ⭐ | |||||||
WGSL shaders |
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>