A high-performance graphics demonstration written in Rust using the wgpu library. This project showcases a modern rendering pipeline setup, including vertex/fragment shaders and uniform buffer manipulation for real-time transformations.
- WGPU Rendering: Utilizes the WebGPU API for cross-platform, low-level graphics access.
- Real-time Transformations:
- Rotation: Rotates the geometry around the Z-axis.
- Scaling: Pulses the size of the triangle dynamically.
- Wobble: Applies a time-based distortion effect via uniforms.
- Shader Pipeline: Custom WGSL shaders for vertex and fragment processing.
- Uniform Buffers: Efficient CPU-to-GPU data transfer for transformation matrices and time variables.
- Rust (latest stable toolchain)
- A graphics driver with Vulkan, Metal, DX12, or GLES3 support.
-
Clone the repository:
git clone https://github.com/your-username/rainbow_triangle.git cd rainbow_triangle -
Run the application:
cargo run
Note: Check
cargo run -- --helpto see available command-line flags for enabling rotation, scaling, or wobble effects.
- wgpu: Safe and portable GPU abstraction.
- winit: Window creation and event handling.
- glam: Fast linear algebra for rendering math.
- bytemuck: Zero-cost casting for buffer data.
- clap: Command-line argument parsing.