r/webgpu • • 1h ago

A procedural environment in WebGPU: compute-built grass and indirect draws with Rust

This is Wildlands, a test scene for Uverse, the engine I'm developing. The grass, flowers, trees and stones are procedural. The volumetric clouds move and change shape too.

It uses Rust + wgpu and WGSL shaders. Grass blades are rebuilt from seeds on the GPU each frame, while a tiled sky cache spreads the cloud rendering across frames. :)

(and it runs natively as well with Windows/macOS with DirectX 12 and Metal!)

Try the WebGPU demo or natively on your computer!

Check out at Uverse + join waitlist so then you can also try Uverse out! :) -> https://uverse.dev/#waitlist

12 Upvotes

2 comments sorted by

•

u/HuttPilot 58m ago

Wow. How does it use rust, I thought webGPU was for the web?

•

u/UverseDev 40m ago

Rust can compile both, into native apps, and/or to WebAssembly which then runs in Browser natively and it has access to WebGPU too!

Native build compiles directly for the OS and render then through Metal, Vulkan or DirectX 12! The engine shares the same rendering code across both!

It's a custom-built game engine. We do not use Three.JS or Godot or something similar!