#extension GL_ARB_draw_instanced : require #extension GL_EXT_gpu_shader4 : require #line 7 struct v2f { vec4 pos; vec4 color; }; #line 12 struct appdata { vec4 pos; int vertexID; }; #line 2 uniform mat4 matrices[64]; uniform mat4 matrix_vp; uniform vec4 colors[64]; #line 17 #line 17 v2f xlat_main( in appdata v, in int instanceID ) { v2f o; vec4 wpos = (matrices[instanceID] * v.pos); #line 21 o.pos = (matrix_vp * wpos); o.color = colors[int(mod(float(v.vertexID), 64.0))]; return o; } varying vec4 xlv_COLOR; void main() { v2f xl_retval; appdata xlt_v; xlt_v.pos = vec4(gl_Vertex); xlt_v.vertexID = int(gl_VertexID); xl_retval = xlat_main( xlt_v, int(gl_InstanceIDARB)); gl_Position = vec4(xl_retval.pos); xlv_COLOR = vec4(xl_retval.color); } // uniforms: // colors: type 12 arrsize 64 // matrices: type 21 arrsize 64 // matrix_vp: type 21 arrsize 0