Skip to content

zaccnz/shaderbg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shaderbg

A demo of shaderbg, showing the Waves scene
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.

note: still in development!

features

  • not a web browser!
  • cross platform
    • only macOS at the moment, Windows eta July
  • compatible with ShaderToy
  • lightweight
  • configurable
  • portable
  • free and open source

packages

name use
shaderbg-render library to load and render scenes
shaderbg shaderbg application
shaderbg-web web demo build

dependencies

build instructions

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

platform notes

macOS
the background can not render behind the menu bar. set a black desktop background for the best experience.

resources