Since you can replace #include <foo> replacing stuff in global might make sense, the problem is global is injected in both vert and frag so you can’t really inject attribute vec4 foo there, one idea for solving this :
This one added a lot of new chunk names so it could be more granular (like there could be a chunk named #include <user_provided_extensions>:
The code that breaks this:
@Mugen87 is this something that could be gradually shuffled around to make it more robust, or is it a dead end because of the imminent coming of NodeMaterial?
I am so incredibly glad that someone is using onBeforeCompile, i’ve used it extensively and came up with a
lot of conclusions, i would love to compare notes!
I posted another example that you might find interesting: