#version 150#extension GL_ARB_uniform_buffer_object : enableuniform MatrixBlock{ mat4 MVMatrix; mat4 NormalMatrix; mat4 ProjectionMatrix;};uniform InstanceBlock{ vec4 rotation[1000]; vec4 position[1000];};....mat4 quatToMatrix(in vec4 q);void main(){ mat4 world = quatToMatrix(rotation[gl_InstanceID]); world[3][0] = position[gl_InstanceID].x; world[3][1] = position[gl_InstanceID].y; world[3][2] = position[gl_InstanceID].z; ....}
This causes glLinkProgram to take a very long time to link for each shader that uses this block. It's painfully slow. If I reduce the number from 1000 to 100 for the position and rotation arrays, the link is considerably faster. I'm compiling on ATI 5700 HD series.
Is this the norm or am I doing it wrong?