A small wgpu renderer written in Rust.
nullprop.sh/wgpu-renderer
Note: the .wasm is about 50 MB because it embeds Sponza.
Note: shadowmaps and volumetric fog are not enabled on WebGL.
Controls:
- WASD - Move horizontally
- Ctrl/Space - Move vertically
- Mouse - Look around
- Scrollwheel - Increase/Decrease movement speed
- ESC - Quit (Only on standalone version)
- PBS
- glTF models
- 1 realtime pointlight
- Shadow mapping & PCF*
- Volumetric fog*
- Simple wgsl preprocessor for includes
- Runs on WASM and native desktop
- Tested on:
Ubuntu 22.04 (Mesa 23.1.0-devel)
Windows 10 Pro 21H2
Firefox 109.0
Chrome 109.0.5414.120
- Tested on:
*Native only
TODO:
- Get shadowmaps & volumetric fog to work on WebGL?
- Improve shadowmap artifacts
- Fix funky transparency around plants
- SSAO
- Bloom
- AA
- Texture filtering
- Immediate mode UI (dear imgui, egui)
- Some type of GI (DDGI, VXGI)
Standalone:
cargo run --release
WASM requires:
- wasm-pack
cargo install wasm-pack
- miniserve, or some other http server, such as
python3 -m http.server
.- For miniserve, see:
run-wasm.sh
- For miniserve, see:
- Sponza
- Obtained from KhronosGroup glTF-Sample-Models repository, converted to .glb
- Cube
- Obtained from KhronosGroup glTF-Sample-Models repository, converted to .glb