My Question is based on this answer GLSL reusable/shared functions, shared constants (OpenGL ES 2.0)?
If I can create a common Shader where is the limit ? Can I write in this common shader Uniform variables ? What is the max amount of common shaders that I can attach to on spezific one ? Increase this Performance ?
Is it recommend ? Anyone experience with this ?
EDIT: In my OpenGL Implementation I have some shaders that extends other shaders. Would it be possible without performance loss to get rid of the duplicate code ?
An example
ShaderC extends ShaderB extends ShaderA. Each of them is loading some uniform variables. Would it be good practice if I create a commonShaderB.glsl and a commonShaderA.glsl and attach them to the program from shaderC to avoid duplicate glsl code ?