mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
3305e88d63
Co-authored-by: Andreas Reich <r_andreas2@web.de> Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com> Co-authored-by: Connor Fitzgerald <connor@modyfi.io> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md | ||
screenshot.png |
hello-triangle
This example renders two different sized triangles to display three same sized triangles, by demonstrating the use of stencil buffers.
First it draws a small "mask" triangle, which sets the stencil buffer at every pixel to 1.
Then, it draws a larger "outer" triangle which only touches pixels where the stencil buffer is less than 1.
To Run
cargo run --bin stencil-triangles