the animated texture matrix with an identity matrix.
Code: Select all
driver->setTransform ( video::ETS_TEXTURE_0, texture );
driver->setMaterial( material );
Code: Select all
driver->setMaterial( material );
driver->setTransform ( video::ETS_TEXTURE_0, texture );
Unfortunately, since revision 1031 texture translation has no
longer been working in CQuake3ShaderSceneNode.
I did a search in the code for buildTextureTransform,
setTextureScale, setTextureRotationCenter, setTextureScaleCenter
and setTextureTranslate and find out that buildTextureTransform
is not used at all and the other functions are only used in
CQuake3ShaderSceneNode.
It seems to me that the author of CQuake3ShaderSceneNode is also the
author of the texture matrix functions and the intention was to
transpose the animated texture matrix. So therefore I suggest that
the setTextureTranslate function is restored to what it was before
revision 1031.
I have created a simple application to test all functions. I have no
idea how to use buildTextureTransform correctly but with some trial
and error I got it to work. Math is not one of my strengths but I
think there is bug in buildTextureTransform. To get the rotatecenter
in center I had to do this...
Code: Select all
m_rotatecenter.Y *= scale.Y;
Code: Select all
m_rotatecenter *= scale;
