Can i make a public subshader

Godot Version

4.2.1

Question

maybe this exists and i just can’t find documentation for it anywhere but i was wondering if godot supports putting shader functions in external files, and calling them from other shaders. in unity this is called a ‘subshader’ and unreal has some version of this too. it would be really helpful for my workflow, but i can’t find it anywhere. thanks

1 Like

Yes you can use .gdshaderinc files like this:

There is an explanation how to use these files in the README

2 Likes

@canslp Make sure to flag the help request as solved if you are happy with the anser :slight_smile: happy to assist further if you have any other questions otherwise

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.