wgpu/examples/water
Andreas Reich 507101987b
Make StoreOp an enum instead of a bool (#4147)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-18 14:58:41 -04:00
..
src Make StoreOp an enum instead of a bool (#4147) 2023-09-18 14:58:41 -04:00
Cargo.toml Move Examples and Tests to Their Own Crates (#3841) 2023-06-10 18:35:46 +00: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

Water example

This example renders animated water.

It demonstrates Read only Depth/Stencil (abbreviated RODS), where a depth/stencil buffer is used as an attachment which is read-only. In this case it's used in the shaders to calculate reflections and depth.

Files:

water
├── main.rs ------------------ Main program
├── point_gen.rs ------------- Hexagon point generation
├── README.md ---------------- This readme
├── screenshot.png ----------- Screenshot
├── terrain.wgsl ------------- WGSL Shader for terrain
└── water.wgsl --------------- WGSL Shader for water

To run

cargo run --bin water

Screenshot

Water example