This is valid GLSL:
uniform sampler2D samp;
vec3 dof(sampler2D tex) {
return texture(tex,vec2(0)).rgb;
}
// ...
dof(samp);
This is not valid:
uniform sampler2D samp;
vec3 dof() {
sampler2D tex = samp;
return texture(tex,vec2(0)).rgb;
}
When inlining function parameters, Shader Minifier might introduce a sampler2D variable which is not allowed.
This is valid GLSL:
This is not valid:
When inlining function parameters, Shader Minifier might introduce a
sampler2Dvariable which is not allowed.