#version 110 // example vert shader with attributes to infer part-scoped variables. uniform sampler2D partValues; uniform float partIndex_val1; uniform float partIndex_val2; attribute float partSlot; varying float z; void main(void) { // remember! unused vars will be optimized out by the linker. so use them! vec4 n = texture2D(partValues,vec2(partIndex_val1, partIndex_val2)); n *= partSlot; gl_Position = n; z = 0.0; }