Hello there,
im writing a compute shader to handle a fluid simulation, and for clarity in the code i would like to divide the compute shader in multiple subfiles that would be called from the main one.
thanks!
Hello there,
im writing a compute shader to handle a fluid simulation, and for clarity in the code i would like to divide the compute shader in multiple subfiles that would be called from the main one.
thanks!
I don’t know for absolute certain (as I’ve never tried it out), but perhaps you can divide your code into “.cginc” files? You’d have your main body of code in your “.shader” file, and then include the “.cginc” files. Perhaps somebody can elaborate on exactly how to do this (i.e. where to put the file, and how to reference it .etc.).