Skip to content

ibaryshnikov/shader-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shader editor

A minimal WebGPU application which can run your WGSL shaders. Built on top of iced, providing the ability to add some UI on top of the rendered image.

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

Multiline editor:

  • edit shader in the text area
  • press Update shader or Ctrl+R to reload shader
  • press Toggle editor to hide shader text

File watcher:

  • edit shader.wgsl file, it will be reloaded on changes

Preview

preview

Roadmap

  • Watch shader file and do hot reload on changes
  • Menu dialog to open shader files
  • Multiline text editor for shaders
  • Syntax highlight
  • Show error position inside editor

Key dependencies

Built with iced, wgpu, winit and other crates. The implementation is based on the following examples:

The text editor uses experimental iced widget.

Using notify for file watching.

License

MIT or Apache-2.0

About

WGSL shader editor for wgpu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published