Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Soft8Soft/pyosl
OSL to GLSL converter
https://github.com/Soft8Soft/pyosl
converter glsl grammar lexer opengl openshadinglanguage osl parser ply shader shading-language translator verge3d yacc
Last synced: 3 months ago
JSON representation
OSL to GLSL converter
- Host: GitHub
- URL: https://github.com/Soft8Soft/pyosl
- Owner: Soft8Soft
- License: mit
- Created: 2020-08-25T08:57:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-25T09:01:52.000Z (over 4 years ago)
- Last Synced: 2024-08-02T13:35:13.678Z (6 months ago)
- Topics: converter, glsl, grammar, lexer, opengl, openshadinglanguage, osl, parser, ply, shader, shading-language, translator, verge3d, yacc
- Language: Python
- Homepage:
- Size: 59.6 KB
- Stars: 37
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OSL to GLSL converter
OSL to GLSL converter written in Python.
This library is an open-sourced component of [Verge3D](https://www.soft8soft.com/verge3d/) toolkit.
## Usage
pyosl includes a command line utility called osl2glsl.py. The command
```
python osl2glsl.py your_shader.osl
```will print converted GLSL shader to stdout. Use the:
```
python osl2glsl.py your_shader.osl > your_shader.glsl
```command to write GLSL shader to the file named `your_shader.glsl`.
## OSL standard library functions
Converter will try to use the built-in GLSL functions where possible. In all other cases it will rename OSL functions as follows:
* noise -> oslNoise
* transform -> oslTransformIt's up to you to write implementations of such oslNAME methods.
## Support
Got questions/found bugs? Ask on the [Verge3D Forums](https://www.soft8soft.com/forums/).## License
This tool is licensed under the terms of the MIT license.