ogre-glslwright
Standalone shader-graph editor for Ogre/GLSL materials, extracted from
Opengate's tools/assetsViewer shader-graph tooling so it can run without
the Opengate game package.
{width=900 height=550}
Standalone app needs (ogre-meshviewer)[https://github.com/OGRECave/ogre-meshviewer] in the root folder. It resuses it completly as base app without modify it.
The node editor is strongly inspired by blender shader editor.
Note. Its firstly supposed to be a toy and showcase, if there are interest or some needs it can be further developed to be some usefull tool maybe.
Features
- Live node editor for glsl fragmentshader
- writes Ogre *.program *.material and *_FS.glsl and the node graph as *.toml
- uses Ogre3D RTSS shader as shader library
- uses noise from https://github.com/stegu/webgl-noise
- uses Ogre-Meshviewer as Main render environment
- only a few nodes available (right click for list)
- undo/redo, zoom/pan, grouping
Usage
- to run the app you need a copy of ogre-meshviewer in the root path.
Call it e.g.:
./ogre_glslwright mesh/ico_sphere.mesh examples/greenHullDamage.toml
Middle-clickto pan the canvasScrollto zoom in/outRight-clickto open the node context menuLeft-clickdraw lasso to select multiple nodesDel|xto delete selected nodesShift-Dto duplicate selection- groups can be folded/unfolded (
double-clickthe group header) Ctrl-clickon node header connect output direct to the output surface inputRight-clickon connection to delete it- Drop a node on a connection line to automatically create a connection
Known limitations and issues
- Until I found a way to activate Imgui textinput in raw python, there is no save name selection and no edit of group names by single click on group header.
- Tool bar is very clunky for now
- No reopen the overlay if had be closed.
- Saveing overwrites the original *.toml
- no AA in standalone app
- weird display scaling for windows 10 and 4K monitor
TODO if needed
- fix Issues
- more nodes
- texture backing
- vertex shader support (displacment?)
- extra viewport?
- pypi package
- ...
Layout
pyproject.toml- standard setuptools/src-layout project.src/glslwright/- pure-python core: graph data model, ogre- and imgui helper.tests/- a few unit tests for the core package.examples- some example files.mesh- reference icosphere.
Setup
Since Ogre3d-14.6.1 it works out of the box with ogre-python and ogre-meshviewer installed. (Tested on win10 and linux)
Clone repos.
git clone https://github.com/Turb/ogre-glslwright.git
cd ogre-glslwright
git clone https://github.com/OGRECave/ogre-meshviewer.git
and install it.
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e .
And run example:
python ogre_glslwright mesh/ico_sphere.mesh examples/testBumpNode.toml
Metadata
Release files for ogre-glslwright 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ogre_glslwright-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / ogre_glslwright-0.1.1-py3-none-any.whl
| Download URL | ogre_glslwright-0.1.1-py3-none-any.whl |
|---|---|
| Size | 68.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc91f22490dc010d7d82abfa386598941b88b78c7d30f193168f7521fb74a0f3
|
|
BLAKE2b-256 checksum How to use checksums |
38993610e213cf8a69ca983604331c8eefac182a7fc3aa68b6b6c26019c5e3cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for ogre-glslwright 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.