Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Evaluating texture coords

9 views
Skip to first unread message

Wojciech "Spook" Sura

unread,
Nov 18, 2009, 7:53:25 AM11/18/09
to
Hi!

Why cannot I evaluate modified texture coordinates in shader program?

varying vec4 TexCoord;

TexCoord = gl_TextureMatrix * gl_MultiTexCoord0;

I receive error:
0(23) : error C1020: invalid operands to "*"

Best regards -- Spook.


Wolfgang Draxinger

unread,
Nov 18, 2009, 8:39:43 AM11/18/09
to
Wojciech "Spook" Sura wrote:

> Hi!
>
> Why cannot I evaluate modified texture coordinates in shader program?
>
> varying vec4 TexCoord;
>
> TexCoord = gl_TextureMatrix * gl_MultiTexCoord0;

There can be several texture matrices. You've to select one, i.e. index
gl_TextureMatrix e.g.:

TexCoord = gl_TextureMatrix[0] * gl_MultiTexCoord0;


Wolfgang


Wojciech "Spook" Sura

unread,
Nov 19, 2009, 6:05:28 AM11/19/09
to
Wolfgang Draxinger wrote:

> Wojciech "Spook" Sura wrote:
> There can be several texture matrices. You've to select one, i.e.
> index gl_TextureMatrix e.g.:
>
> TexCoord = gl_TextureMatrix[0] * gl_MultiTexCoord0;

Thanks! Problemo solved.

> Wolfgang

Best regards -- Spook.


0 new messages