hello,
i changed the fetching.vert shader so that i would be able to access rgb individually for shifting the vertices, but the result does not suggest that.
is vec4 color = texture2D(MyTex, gl_MultiTexCoord0.st) not a vector with RGBA of a single vertex ?
best
erich
here the shader:
uniform float cr, cg, cb; uniform sampler2D MyTex; varying vec4 C; void main() { vec4 v = vec4(gl_Vertex); vec4 color = texture2D(MyTex, gl_MultiTexCoord0.st); v.z = color.r*cr + color.g*cg +color.b*cb; // v.x += (color.b-0.5)/2.; // v.y += (color.g-0.5)/2.;
C=color; gl_Position = gl_ModelViewProjectionMatrix * v; }