waves demo scene (ported from Vanta.js)
try it online here
note that WebGPU is required, and not supported by all browsers.
lightweight animated backgrounds.
built to be cross-platform (Windows, macOS, Linux) using Rust.
- not a web browser!
- cross platform
- only macOS at the moment, Windows eta July
- compatible with ShaderToy
- lightweight
- configurable
- portable
- free and open source
name | use |
---|---|
shaderbg-render |
library to load and render scenes |
shaderbg |
shaderbg application |
shaderbg-web |
web demo build |
- egui = "0.22.0"
- toml = "0.7.3"
- serde = "1.0"
- clap = "4.2.4", log = "0.4", pollster = "0.3.0", raw-window-handle = "0.5"
- render
- desktop
- tao = "0.20.0"
- env_logger = "0.10.0"
- image = "0.24.6"
- chrono = "0.4.24"
- webbrowser = "0.8.10"
- zip = "0.6"
- Windows only: windows = "0.48"
- macOS only: cocoa = "0.24", objc = "0.2.2"
- web
- winit = "0.28.6"
- egui-winit = "0.22.0"
- wasm-bindgen = "0.2.86"
- wasm-bindgen-futures = "0.4.36"
- web-sys = "0.3.22"
- getrandom = "0.2", web-time = "0.2.0", console_log = "1", console_error_panic_hook = "0.1.7"
to build and run the desktop application
cargo run -p shaderbg
to build the web demo
rustup target add wasm32-unknown-unknown
cargo install -f wasm-bindgen-cli
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --target wasm32-unknown-unknown -p shaderbg-web
wasm-bindgen --out-dir generated --web target/wasm32-unknown-unknown/debug/shaderbg-web.wasm
then serve the generated
folder.
example, using npm's http-server: http-server -p80 ./generated
macOS
the background can not render behind the menu bar. set a black desktop background for the best experience.
- Learn WGPU by Ben Hansen
- wgpu-life by Blake Jones
- wgpu-demo by Aleksey Fedotov
- Vanta.js by Teng Bao
- cefrust's swizzleSendEvent
- wgpu-rs on the web by gfx-rs nuts and bolts
- BlueEngineEGUI by Elham Aryanpur