Ale

04-01-2004, 10:35 AM

How to calculate (s,t,r,w) coordinate in projective texture mapping?

I have a projector model trasformation Mproj,

,a projection trasformation Pproj, and

a matrix scale and bias T.

T={1/2,0,0,1/2, 0,1/2,0,0, 0,0,1/2,0, 1/2,1/2,1/2,1} and M is the opengl modelview matrix.

I use coordinate generation

GLfloat eyePlaneS[] = { 1.0, 0.0, 0.0, 0.0 };

GLfloat eyePlaneT[] = { 0.0, 1.0, 0.0, 0.0 };

GLfloat eyePlaneR[] = { 0.0, 0.0, 1.0, 0.0 };

GLfloat eyePlaneQ[] = { 0.0, 0.0, 0.0, 1.0 };

and set GL_EYE_LINEAR.

How opengl computes texture coordinate (s,t,r,q)

for vertex v?

What is the formula?

:confused:

I want only use glTexCoord4f to implement projective texture mapping.

Thanks in advance.

Ale.

I have a projector model trasformation Mproj,

,a projection trasformation Pproj, and

a matrix scale and bias T.

T={1/2,0,0,1/2, 0,1/2,0,0, 0,0,1/2,0, 1/2,1/2,1/2,1} and M is the opengl modelview matrix.

I use coordinate generation

GLfloat eyePlaneS[] = { 1.0, 0.0, 0.0, 0.0 };

GLfloat eyePlaneT[] = { 0.0, 1.0, 0.0, 0.0 };

GLfloat eyePlaneR[] = { 0.0, 0.0, 1.0, 0.0 };

GLfloat eyePlaneQ[] = { 0.0, 0.0, 0.0, 1.0 };

and set GL_EYE_LINEAR.

How opengl computes texture coordinate (s,t,r,q)

for vertex v?

What is the formula?

:confused:

I want only use glTexCoord4f to implement projective texture mapping.

Thanks in advance.

Ale.