For a complex app with lots of MSL shader functions and utility functions, it makes some sense to split things between multiple .metal files. If functions in one file need to refer to functions in other files, I assume we’ll need to have function declarations to resolve the external references. Does it make sense to put these in .h files (or some other suffix) that are seen only by the shaders (e.g. not bridged header files as for types shared between MSL and Swift)?
For example, let’s say I made a Utility.metal file that contained the missing mod function. Would it make sense to have a Utility.h?
I haven’t even tried this yet but I was hoping to hear if you recommended a best practice.