Skip to content

Repository files navigation

wgpu-shader-explorer

Local interactive playground for writing and live-previewing WGSL compute and fragment shaders. Tauri shell, native wgpu validation, real-time error feedback, exportable shader snapshots.

Status

Phase What State
0 Scaffold: Tauri v2 + React + native wgpu/naga validator
1 WGSL editor (textarea + monospace) + validate_wgsl IPC
2 Compile + render fragment shaders to offscreen texture, surface to canvas
3 Snippets library (save/load WGSL + thumbnail)
4 Uniforms panel (time, mouse, resolution) auto-bound
5 Compute shader support + GPU buffer inspector
6 Shader snapshot export (PNG + .wgsl)

Current scaffold launches an empty Tauri window that calls the Rust backend to validate a sample WGSL shader via naga. Real wgpu rendering lands in Phase 2.

Stack

  • Frontend: Bun + Vite + React 19 + TypeScript
  • Shell: Tauri 2 — ~10MB native binary
  • GPU: wgpu 0.20 (cross-backend: Vulkan / Metal / DX12 / WebGPU)
  • WGSL parser: naga 0.20

Quick start

bun install
cd src-tauri && cargo fetch && cd ..
bun run tauri dev

Production build:

bun run tauri build

Why

Shader iteration cycles on bigger engines (Unreal, Unity) involve full recompiles and pak repacking. A local scratchpad with sub-second feedback for fragment + compute is the missing tool. Bonus: native wgpu means the same WGSL works in the browser unchanged.

Layout

src/                  # React frontend
src-tauri/            # Rust backend + Tauri config
  src/                # main.rs, lib.rs
  Cargo.toml
  tauri.conf.json
shaders/              # sample WGSL files
.github/workflows/    # CI

License

MIT. See LICENSE.

About

Local interactive playground for writing and live-previewing WGSL compute and fragment shaders. Tauri v2 + native wgpu + naga.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages