 }
 
 void addWithWeight(inout Vertex v, Vertex src, float weight) {
-    for(int i = 0; i < LENGTH; i++) {
-        v.vertexData[i] += weight * src.vertexData[i];
+    for(int j = 0; j < LENGTH; j++) {
+        v.vertexData[j] += weight * src.vertexData[j];
     }
 }
 
 Vertex readVertex(int index) {
     Vertex v;
     int vertexIndex = primvarOffset + index * STRIDE;
-    for(int i = 0; i < LENGTH; i++) {
-        v.vertexData[i] = texelFetch(vertexBuffer, vertexIndex+i).x;
+    for(int j = 0; j < LENGTH; j++) {
+        v.vertexData[j] = texelFetch(vertexBuffer, vertexIndex+j).x;
     }
     return v;
 }

    Vertex dst;
    clear(dst);

    int offset = texelFetch(offsets, current).x,
        size = texelFetch(sizes, current).x;

    for (int i=0; i<size; ++i) {
        int index = texelFetch(indices, offset+i).x;


out float outVertexBuffer[LENGTH];

uniform usamplerBuffer sizes;
uniform isamplerBuffer offsets;
uniform isamplerBuffer indices;
uniform samplerBuffer  weights;
