Hello Erich,
No problem here on MacOSX.5.8 with pd-ext 0.41.4 and GEM 0.91.3 'tigital'. My graphic card here : ATI Radeon HD 2600 Pro What is your graphic card ? Do you have errors in Pd console ?
[glsl_program]: uvar#0: "MyTex": [glsl_program]: unknown (0x8B5E) [glsl_program]: uvar#1: "cr": [glsl_program]: GL_FLOAT [glsl_program]: uvar#2: "cg": [glsl_program]: GL_FLOAT [glsl_program]: uvar#3: "cb": [glsl_program]: GL_FLOAT [glsl_program]: uvar#4: "gl_ModelViewProjectionMatrix": [glsl_program]: GL_FLOAT_MAT4_ARB
Here my patch where you need to change the messages cr, cg, cb. I use your vertex shader and the fragment shader with 'gl_FragColor = C;' ++
Jack
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;
}
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev