wgpu/examples/conservative-raster
Connor Fitzgerald 2a9fdf9aa1
Misc Repo Cleanup Tasks (#4579)
* Misc Repo Cleanup Tasks

* Dependency Trimming

* Dep cleanup

* Restrict libfuzzer

* Flip cfg

* mod fuzz
2023-10-27 00:15:51 -04:00
..
src Misc Repo Cleanup Tasks (#4579) 2023-10-27 00:15:51 -04:00
Cargo.toml Misc Repo Cleanup Tasks (#4579) 2023-10-27 00:15:51 -04:00
README.md Formatting and example command fixes (#3872) 2023-06-15 20:05:26 +00:00
screenshot.png Move Examples and Tests to Their Own Crates (#3841) 2023-06-10 18:35:46 +00:00

conservative-raster

This example shows how to render with conservative rasterization (native extension with limited support).

When enabled, any pixel touched by a triangle primitive is rasterized. This is useful for various advanced techniques, most prominently for implementing realtime voxelization.

The demonstration here is implemented by rendering a triangle to a low-resolution target and then upscaling it with nearest-neighbor filtering. The outlines of the triangle are then rendered in the original solution, using the same vertex shader as the triangle. Pixels only drawn with conservative rasterization enabled are depicted red.

To Run

cargo run --bin conservative-raster

Screenshots

Conservative-raster window