An integration of glslify for godot 3.x
copy the folder glslify_godot from the addons folder into the addons folder of your proyect.
- npm
- glslify accessible as
npx glslify ...
The addon takes shaders defined as .glsl files inside the res://shaders directory and compiles them into .shader files inside the res://compiled_shaders directory to be used directly inside godot! It works as a build system, watching the files for changes and automagically reloading them in godot!
- Some function names break it when you use them inside a module (ex: texture).
- As the shader will be compiled godot wont know the original filename or line number when it reports an error.
- You'll need to use an external editor to edit the glsl files since godot does not detect them.
Feel free to open an issue or fork the project, this was an internal tool made while working on Runa & The chaikurú legacy. This project won't be updated to godot 4.x as most of the problems that this solves are solved by the engine with shader preprocessing.