hi i want to know when we use texture matrix like this
do i change the coordinate of the texture? if yes ,how to give the same texture coordinates at geometry vertices no matter what the orientation and the texture matrix does the rotation? in another words i want to draw a stack of parallel planes parallen to the screen to form the image in volume rendering using 3d texture?
If you don’t want the texture matrix to modify your texture coordinates, just push the matrix, load it with an identity matrix, send your “literal texture coordinates”, then pop the matrix.
Or, maybe even better: don’t draw the unmodified texture coordinates in the same loop as the modified ones. That should save you a lot of matrix operations.
But if you want correct looking transparency and can’t live with additive blending for the grid, you’ll have to render back to front and modify the matrix for every layer rendered.
do you means that before the popmatrix i do the mapping like this:
i want to get a cube , no matter the orientation or he texture matrix does rotation ,the cube will be rendered from back to front of a stack of plane parallel the screen. but can see the change of texture in side.do i do the right?