|
|
@ -254,9 +254,15 @@ void UVController::apply(osg::StateSet* stateset, osg::NodeVisitor* nv)
|
|
|
|
float uScale = mUScale.interpKey(value);
|
|
|
|
float uScale = mUScale.interpKey(value);
|
|
|
|
float vScale = mVScale.interpKey(value);
|
|
|
|
float vScale = mVScale.interpKey(value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
osg::Matrix flipMat;
|
|
|
|
|
|
|
|
flipMat.preMultTranslate(osg::Vec3f(0,1,0));
|
|
|
|
|
|
|
|
flipMat.preMultScale(osg::Vec3f(1,-1,1));
|
|
|
|
|
|
|
|
|
|
|
|
osg::Matrixf mat = osg::Matrixf::scale(uScale, vScale, 1);
|
|
|
|
osg::Matrixf mat = osg::Matrixf::scale(uScale, vScale, 1);
|
|
|
|
mat.setTrans(uTrans, vTrans, 0);
|
|
|
|
mat.setTrans(uTrans, vTrans, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mat = flipMat * mat * flipMat;
|
|
|
|
|
|
|
|
|
|
|
|
// setting once is enough because all other texture units share the same TexMat (see setDefaults).
|
|
|
|
// setting once is enough because all other texture units share the same TexMat (see setDefaults).
|
|
|
|
if (!mTextureUnits.empty())
|
|
|
|
if (!mTextureUnits.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|