kon

02-05-2002, 02:43 AM

Hi

For projective texture mapping I'm computing the projection matrix M = T*S*P*V-1 where T is the translation by 0.5 in x, y, z, S is scaling by 0.5 in x, y, z, P is the projection with fov = 45, aspect 1.0, near .1, far 1. and V-1 is the inverse of the projector's transformation. Then I enable GL_EYE_LINEAR and fill the four rows of M into the four texgen planes accordingly.

Now having texture parameters (of the texture to be projected) set to GL_REPEAT the projection is fine and of course repeated. Changing it to GL_CLAMP gives the projected texture but the four borders are then still repeated! The multiplication by P should transform the vector into the range [-1, 1] and the scaling/translating will map to the range [0, 1]. What can be the reason for this repeatness?

Thanks

kon

For projective texture mapping I'm computing the projection matrix M = T*S*P*V-1 where T is the translation by 0.5 in x, y, z, S is scaling by 0.5 in x, y, z, P is the projection with fov = 45, aspect 1.0, near .1, far 1. and V-1 is the inverse of the projector's transformation. Then I enable GL_EYE_LINEAR and fill the four rows of M into the four texgen planes accordingly.

Now having texture parameters (of the texture to be projected) set to GL_REPEAT the projection is fine and of course repeated. Changing it to GL_CLAMP gives the projected texture but the four borders are then still repeated! The multiplication by P should transform the vector into the range [-1, 1] and the scaling/translating will map to the range [0, 1]. What can be the reason for this repeatness?

Thanks

kon