So I gave a try at your shader + qml UI and even if I remove one or few lines I still get the same error message:
[Plugin] Custom UI located at 'file:///E:/DATA/Documents/Allegorithmic/Substance Painter/shelf/shaders/custom-ui/material-layering/custom-ui_cc.qml' used for shader parameters display
[Plugin - customUI/shelf/shade...] Cannot read property 'description' of null
Not sure why you don't get it all the time in your case.
As for inlining as I suggested by PM, I meant converting this:
vec3 flattenNormal(vec3 normal, float flatness)
{
return normalize(mix(normal, vec3(0,0,1), flatness));
}
To this:
vec3 flattenNormal(vec3 normal, float flatness){ return normalize(mix(normal, vec3(0,0,1), flatness)); }
As an example.
You will save a few line returns (if your issues is really from there). We don't support custom includes for now with our shader system. Could be related to a GPU drivers bug as well, since it is the one compiling the shader. What are your current hardware specifications ?