I’m posting this for reference and peer review - the following vertex shader code makes my ATI 9600 + Cat. 6.8 go into software mode rendering. On NVIDIA it renders in hardware, and correctly.
attribute vec4 w1i1w2i2;
uniform mat4 view_projection_mat;
uniform vec4 bones[108];
vec4 skinning_2_bones(vec4 vertex_os, vec4 w1i1w2i2, const in vec4 bones[108])
{
vec4 ret;
vec4 q1;
// blend 2 bones transform
q1 = w1i1w2i2.x * bones[int(w1i1w2i2.y)] + w1i1w2i2.z * bones[int(w1i1w2i2.w)];
ret = q1;
return ret;
}
void main()
{
gl_Position = view_projection_mat * skinning_2_bones(gl_Vertex, w1i1w2i2, bones);
}
WORKAROUND: Do not use GLSL functions when dynamicaly accessing uniform arrays on ATI, do it directly from main(). (although that too has its own, different, problems like not working when uniform bones array has > 31 elements - a bit more tricky one, hopefully a distilled repro. case will appear in my next topic)
@Humus: I’ve emailed you the Shader Designer project for the problem