attribute vec3 position;
attribute vec2 uv;

uniform mat4 worldViewProjection;
#ifdef requiresWorldFragment
    uniform mat4 worldMatrix;
#endif

out float vColorPixelIndex;
#ifdef requiresWorldFragment
    out vec3 vPositionW;
#endif

void main(void) {
    #ifdef requiresWorldFragment
        vPositionW = (worldMatrix * vec4(position, 1.0)).xyz;
    #endif
    vColorPixelIndex = uv.x;
    gl_Position = worldViewProjection * vec4(position, 1.0);
}