Explore Rust-based WebGPU samples for graphics rendering.
Project details
Discover a collection of Rust examples for learning WebGPU, featuring demos that illustrate rendering techniques and compute shaders. This project showcases various graphical capabilities, from simple triangle rendering to complex particle systems and cloth simulations, making it an excellent resource for developers looking to enhance their graphics programming skills.
The webgpu repository provides a collection of Rust examples designed for learning WebGPU, inspired by Sascha Willems' Vulkan samples. This project enhances graphics programming through engaging demonstrations with both WebAssembly (WASM) and native support, utilizing the Sib rendering module.
Explore the WASM demos available here.
The repository includes a diverse range of examples showcasing various graphical techniques:
| Example | Description |
|---|---|
triangle | Renders a colored indexed triangle using vertex and index buffers with paired WGSL shaders and a depth attachment. |
vertexattributes | Demonstrates interleaved and separate vertex attribute buffers with shaders positioned for position, normal, UV, and tangent data. |
particlesystem | Manages flame and smoke particles updated on the CPU, rendering them as billboard sprites over a normal-mapped scene. |
computeparticles | Updates 262,144 particle records using compute workgroups and displays the GPU-rendered state as additive billboards. |
computecloth | Simulates a cloth grid with spring connections in compute shaders, involving collisions and rendering the created cloth mesh. |
gltf | Loads and renders a textured glTF 2.0 box from a URL, with buffer and material conversions for comprehensive rendering. |
geometrydash | Offers an original one-button rhythm platformer featuring procedural GPU geometry and multiple control options, inspired by the classic Geometry Dash game. |
This repository serves as an invaluable learning resource for developers interested in leveraging Rust with advanced rendering techniques in WebGPU. The well-documented examples provide a practical approach to experimenting with graphical computations and rendering in modern web environments.
Comments
1Thank u for sharing.