mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 15:00:57 +01:00
* Make `depth_compare` and `depth_write_enabled` optional These fields are optional in the WebGPU API. Having them optional in the wgpu API as well keeps validation logic centralized in wgpu-core. Fixes #8830 * Remove `DepthStencilStateIdl`
stencil_triangles
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 wgpu-examples stencil_triangles
