#version 110 // vert shader passes coordinates straight through, and the partId out. attribute float partId; attribute vec3 pos; varying float partIdV; void main(void) { // pass through, letting Z be the depth. vec4 n = vec4(pos.xyz, 1.0); gl_Position = n; partIdV = partId; }