i'm trying to use a jit.gl.mesh to draw a plane with an image as texture, and i'm trying to use a glsl script to change the verteces of this plane based on a jitter matrix that i bring into my script as the 'tangent array".
i have a number of questions.
without using a programmable shader,
1) i find that my plane must be the same dimentions as my texture matrix; if not, i don't see the full image but only as many pixels as my planes dimensionality. when i use somethin like jit.gl.videoplane, on the other hand, my plane can be a much lower dimension than my image and i still see all the image. why?
2) what should be dimensions and plane-count of the textcoord array, the normal array, specular array..... ?
now, with using a glsl shader:
3) i find that when i use the two "thru" vertex/fragment programs in the "share" folder:
i no longer see anything rendered.
4) when i use these two scripts i found after some research:
gl_TexCoord = gl_MultiTexCoord0;
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
uniform sampler2DRect tex0;
void main (void)
vec4 color = texture2DRect(tex0, gl_TexCoord.st);
gl_FragColor = color;
then i get my plane drawn, but it's all black. i'm trying to give jit.gl.mesh a texture from the outside with the "texture" messages to its first inlet. my texture is an jitter matrix with the same dims as my plane. is that the way?
thanks in advance....