Yeah, that was the feeling that I got. I guess I have to use a clunky workaround. Thanks for the help.

David

On Jan 7, 2009, at 10:04 PM, vade wrote:

Yup, this is an issue ive had too.

#1, texture unit 0 (GL_TEXTURE0) is the 'highest up', image index in the GLSL patch. texture 1 (GL_TEXTURE1) is whatever it decides is the next one below. This can change when you edit your GLSL code, so your texture units are constantly 'moving around', especially annoying if you comment out code, or dont use a sampler in the actual main function, it will decide since its not in use it will not present itself as a patchable input.

The other thing I noticed also, is that gl_MultiTexCoord1 or higher does not ever see to be assigned, as far as I have been able to deduce. Thus all of your calculations have to be done off of the base 0 coord (as the earth patch does).

For this reason I just make my own QC plugins rather than use the GLSL patch. Its HORRIBLY annoying to use at the end of the day. Annoying, I know.

Im pretty sure about the texture matrices not being properly applied, last I checked was a few revisions of QC ago. But the moving texture units around definitely happens.

On Jan 7, 2009, at 8:18 PM, David Yamnitsky wrote:

Hi everyone, I'm having trouble accessing multiple images from a single GLSL shader in quartz composer. I'm very new to GLSL so this might be a trivial point.

gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;

If I do this (in the vertex shader), how do I identify which texture belongs to which index? I've looked at the Earth example, but its method of using the same texcoords for all images won't apply to my case because while the two textures I use have the same dimensions they may have different texture matrices (one may or not be flipped opposite the other, depending on the situation).

Any help would be appreciated, thanks.
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.com

This email sent to [email protected]



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to