A Question about TexGen

  • Follow


Hi All.
I have a question about how ogl auto generate the texture coordinates.
I have read the glspec2.0 and found when use OBJECT_LINEAR,the
generation function is:
g = p1xo + p2yo + p3zo + p4wo
so we can write as:g = (p1 p2 p3 p4)(xo yo zo wo)T

and EYE_LINEAR is:
g = p'1xe + p'2ye + p'3ze + p'4we
so we can write as: g = (p'1 p'2 p'3 p'4)(xe ye ze we)T

as ( p'1 p'2 p'3 p'4 ) = ( p1 p2 p3 p4 )M-1
and (xe ye ze we)T = M(xo yo zo wo)T
so when use EYE_LINEAR,the function is also:g=(p1 p2 p3 p4) (xo yo zo
wo)T
same as OBJECT_LINEAR.

As we all know,these two function indeed have difference in use,but why
it seems they have the same generation function? Am I miss something?

0
Reply CHUJINGJUN (2) 3/21/2006 8:11:14 AM

Alvin wrote:
> when use OBJECT_LINEAR,the generation function is:
> ...
> 
> and EYE_LINEAR is:
> ...
 >
> As we all know,these two function indeed have difference in use,but why
> it seems they have the same generation function? Am I miss something?
> 

OBJECT_LINEAR uses the coordinate of the vertex
as input

EYE_LINEAR uses the vertex transformed by the
current MODELVIEW matrix.


-- 
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again.  They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful.  But it happens
every day.  I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address

0
Reply fungus 3/21/2006 5:07:07 PM


1 Replies
109 Views

(page loaded in 0.064 seconds)

5/5/2013 9:44:05 AM


Reply: