A local shader development environment
Project description
Shader Workshop
This tool is a local HTTP/WebSocket server monitoring the specified shader fragment directory. It allows live coding fragment shaders with your preferred code editor, and having them rendered in your browser through WebGL2.
Features
- Hot reload
- Live controls for basic uniforms
- Mouse position
#includedirective- Play/Pause/Reset time
- Screenshot
- Resolution and aspect ratio controls
- Lightweight, no web dependencies
Install
pipx install shader-workshop
pip can also be used.
Usage
sw-server /path/to/fragment/shaders
If unspecified, sw-server will use the examples directory.
All the .frag files in that directory will be tracked and accessible through
the web interface.
Fragment inputs and outputs
Every fragment gets the following uniforms as input:
float time: the time in secondsvec2 resolution: the canvas resolution in pixels
They must write on the vec4 out_color output to produce a color.
The compatibility is currently set to 300 es.
Live controls
To expose controls to the web UI, declare a uniform in your fragment shader. Optionally, in the comment beside, you can specify the default value and ranges. For example:
uniform float angle; // def:0.7 min:0.6 max:0.9
uniform int steps; // def:7 min:0 max:10
uniform bool debug; // def:1
uniform vec3 color; // def:1,0.5,0
Currently, float, int, bool and vec3 (for colors only) are supported.
Includes
It is possible to include .glsl files using an #include directive:
#include name (no quote nor explicit .glsl). Recursive includes (.glsl
including .glsl) are supported, as well as including multiple times the same
file (through recursion or not). Their changes are also monitored by the file
watcher.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shader_workshop-0.5.0.tar.gz.
File metadata
- Download URL: shader_workshop-0.5.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c92ac6bea3538f06479043c7b3d2c6c4735f6d1a31b360b47fe84965a33954cf
|
|
| MD5 |
eb0f8e0d7a0d9f04c07798b18bedb186
|
|
| BLAKE2b-256 |
037825979408c778e715493c48a484ba8387d26de58ff04331b6a45c2c961945
|
Provenance
The following attestation bundles were made for shader_workshop-0.5.0.tar.gz:
Publisher:
python-publish.yml on ubitux/ShaderWorkshop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shader_workshop-0.5.0.tar.gz -
Subject digest:
c92ac6bea3538f06479043c7b3d2c6c4735f6d1a31b360b47fe84965a33954cf - Sigstore transparency entry: 261757585
- Sigstore integration time:
-
Permalink:
ubitux/ShaderWorkshop@68d7f61b2bfc2cee53dd6090d9f4e3b8b43e1293 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ubitux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@68d7f61b2bfc2cee53dd6090d9f4e3b8b43e1293 -
Trigger Event:
release
-
Statement type:
File details
Details for the file shader_workshop-0.5.0-py3-none-any.whl.
File metadata
- Download URL: shader_workshop-0.5.0-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffddda29d8039ee2583eeb30dc4ec3a8dccbe38e9b0dea358bf5ddb031dc8ba3
|
|
| MD5 |
649c17bf687c947d0b7181d722d22cb3
|
|
| BLAKE2b-256 |
fe9fa351d1e92569f2504bba32244fdc84c3607e32b23fe53b51d2cac0b843db
|
Provenance
The following attestation bundles were made for shader_workshop-0.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on ubitux/ShaderWorkshop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shader_workshop-0.5.0-py3-none-any.whl -
Subject digest:
ffddda29d8039ee2583eeb30dc4ec3a8dccbe38e9b0dea358bf5ddb031dc8ba3 - Sigstore transparency entry: 261757590
- Sigstore integration time:
-
Permalink:
ubitux/ShaderWorkshop@68d7f61b2bfc2cee53dd6090d9f4e3b8b43e1293 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ubitux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@68d7f61b2bfc2cee53dd6090d9f4e3b8b43e1293 -
Trigger Event:
release
-
Statement type: