https://github.com/ibaryshnikov/shader-editor
WGSL shader editor for wgpu
https://github.com/ibaryshnikov/shader-editor
iced rust webgpu wgpu wgsl winit
Last synced: about 2 months ago
JSON representation
WGSL shader editor for wgpu
- Host: GitHub
- URL: https://github.com/ibaryshnikov/shader-editor
- Owner: ibaryshnikov
- License: mit
- Created: 2023-08-20T18:06:59.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-06T00:53:50.000Z (3 months ago)
- Last Synced: 2025-04-19T14:57:55.136Z (2 months ago)
- Topics: iced, rust, webgpu, wgpu, wgsl, winit
- Language: Rust
- Homepage:
- Size: 97.7 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shader editor
A minimal WebGPU application which can run your WGSL shaders.
Built with iced, providing the ability to add some UI on top
of the rendered image.Syntax highlight is kindly borrowed from [halo](https://github.com/bungoboingo/halo)
## Motivation
The main goal is to provide a quick way to develop shaders with
a fast iteration loop. Inspired by tools like shadertoy.## Usage
Use `cargo run` to start
Editor:
- press `Update shader` or `Ctrl+R` to reload shaderFile watcher:
- edit `shader.wgsl` file, it will be reloaded on changes## Preview
## Roadmap
- [x] Watch shader file and do hot reload on changes
- [ ] Menu dialog to open shader files
- [x] Multiline text editor for shaders
- [x] Syntax highlight
- [ ] Show error position inside editor## Details
The implementation is based on the following examples:
- iced [integration](https://github.com/iced-rs/iced/tree/master/examples/integration)
- wgpu [cube](https://github.com/gfx-rs/wgpu/tree/trunk/examples/cube)
and [hello-triangle](https://github.com/gfx-rs/wgpu/tree/trunk/examples/hello-triangle).Using [notify](https://github.com/notify-rs/notify)
for file watching.