https://github.com/oseiskar/glsl-bench
simple Python and JavaScript framework for GLSL demos
https://github.com/oseiskar/glsl-bench
glsl javascript python webgl
Last synced: about 1 month ago
JSON representation
simple Python and JavaScript framework for GLSL demos
- Host: GitHub
- URL: https://github.com/oseiskar/glsl-bench
- Owner: oseiskar
- License: mit
- Created: 2016-02-24T17:14:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T09:41:41.000Z (over 2 years ago)
- Last Synced: 2025-02-07T15:16:26.505Z (3 months ago)
- Topics: glsl, javascript, python, webgl
- Language: Python
- Homepage:
- Size: 833 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# glsl-bench
A simple Python and JavaScript (WebGL) framework for running GLSL demos and Monte Carlo image generation,
e.g., raytracers. Similar to [Shadertoy](https://www.shadertoy.com/) in basic
functionality but runs locally.**Usage**
python glsl_bench.py examples/basic/conf.json
or
python3 -m http.server 8000 --bind 127.0.0.1
# open: http://localhost:8000/?shader=examples/black-hole/black-hole.json**Features**
* Binding variables such as `mouse`, `time` and `previous_frame` to GLSL uniforms using a JSON configuration file.
* Specifying textures in configuration files
* Image output in raw float (`.npy`) and PNG formats**Python dependencies**: Install as `pip install -r requirements.txt`
**JavaScript** version uses [TWGL](https://twgljs.org/), which included
in `js_libs/` (distributed under the MIT license)