Delving in the dark magic of Shaders and trying to modify the Standard Material Shader I’ve seen that there’s zero documentation regarding the shader chunk system.
There is some (enough) to get you introduced to how GLSL works but for example. Yesterday I finished a nice grass shader with a slight sway animation, all was good, but I figured that it’d be cooler with PBR rendering on it, shadows, etc.
So I started delving into the shader chunk system and I encountered a lot of problems (some because of super old forum threads). Anyway, I achieved modifying the Vertex Shader correctly and it works as I want but now I see that for absolutely no reason, the Fragment Shader isn’t even applying the scene ambient color, no shadows, no nothing.
I haven’t applied any modification to the fragment shader, yet it ends up like this:
Now I have to figure out why the heck isn’t it using the Standard Fragment Shader which is the main reason I switched to modifying existing chunks… because I want all of the other features in.
This wouldn’t happen if there was documentation about shader chunks, how they work, simple examples on how to use, etc.
Please, whoever is in charge of the Shader Chunk System in the PlayCanvas team, save me of some frustration by explaining how it works so I can stop tweaking blind-mode.