All pastes #119146 Raw Edit

Something

public text v1 · immutable
·published 2006-08-06 18:02 UTC
rendered paste body
mat4 matk=mat4(0.5,  0  ,  0   , 0.5,
 0   , 0.5 , 0   , 0.5,
 0  ,  0 ,   0.5,  0.5,
 0  ,  0  ,  0 ,   1 );

gl_TexCoord[1]= (matk)*gl_Position*ubermatrix;

the uber matrix is calculated on the cpu using the following(it seems multiplication order is important)

core::matrix4 invv=driver->getTransform(video::ETS_VIEW);
invv.makeInverse();
invv*=(driver->getTransform(video::ETS_VIEW)*driver->getTransform(video::ETS_PROJECTION));


ubr matrix is mad e of inverse view*view*proj