Baffled by the Texture Matrix

I’m manipulating the texture matrix to do 3D texture volume rendering stuff. I still can’t quite grasp how the texture matrix actually affects the display of textures (mainly interested in 3D texture but I’m guessing the matrix affects all textures equally)

For example, when you translate the texture matrix, does the bound/rendered texture actually move as far as the viewer is concerned? If the same translation was applied to the modelview matrix, will the polygons move the same way as the texture or the opposite way?

Let’s say the modelview matrix is identity, and the projection matrix is setup such that the a rendered square of side 2 is rendered in the center of the viewport with some z offset (whatever it is, the square will be rendered on the center) Now, let’s say you load identity matrix to the texture matrix, then translate it (-1, 0, 0). If you now bind a texture to the cube and render it, will you see the whole texture rendered or only half of it?

How about rotation of the texture matrix? How does that affect things?

I’m sorry I’m babbling. I thought I knew how everything worked but seems I don’t. It’s been really frustrating… I can’t really seem to find much information regarding this stuff online. Can you direct me to an useful source?

I’d appreciate any input.

The texture matrix is used to generate texture coordinates based on the vertex data. For example, for projective texturing think of the matrix as a transform for a kind of ‘slide projector’ positioned in world space. All the transformed positions of the verts is used as texture coordinates. Have you checked this out yet?:
http://developer.nvidia.com/docs/IO/1317/ATT/projective_texture_mapping.pdf

Hope this helps

Actually, the texture matrix is used to apply transformations to the texture coordinates. It’s texgen that generates texture coordinates from the vertex data.

-Ilkka