> So - this instead? Vertex:
> 
> uniform sampler2DRect texture;
> 
> void main()
> {
>       //Transform vertex by modelview and projection matrices
>       gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
>       
>       //Forward current color and texture coordinates after applying texture 
> matrix
>       gl_FrontColor = gl_Color * texture2DRect(texture, gl_TexCoord[0].xy);
>       gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
>       
> }
> 
> and this Fragment:
> 
> void main()
> {
>       gl_FragColor = gl_Color;
> }
> 
> I'll try it out and let you know. Thanks again.

Almost:  in the vertex shader, gl_TexCoord[0] needs to be set _before_ it's 
used in the texture2DRect function -- otherwise, you'll have slightly wrong 
texture coordinates.  So just swap the last two lines of the vertex shader.  
tried it on my old 10.5 machine, and the results appeared to be identical.

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

This email sent to arch...@mail-archive.com

Reply via email to