truncation warning cleanups dx side (was also causing cornercase crashes gl side)

This commit is contained in:
Azaezel 2016-02-26 00:21:01 -06:00
parent 8c5810adad
commit 496b6a3ea8
2 changed files with 4 additions and 4 deletions

View file

@ -365,7 +365,7 @@ Var* ShaderFeatureGLSL::getOutTexCoord( const char *name,
// Statement allows for casting of different types which
// eliminates vector truncation problems.
String statement = String::ToString( " @ = %s(tMul(@, @));\r\n", type );
String statement = String::ToString( " @ = %s(tMul(@, @).xy);\r\n", type );
meta->addStatement( new GenOp( statement , texCoord, texMat, inTex ) );
}
else
@ -813,7 +813,7 @@ Var* ShaderFeatureGLSL::addOutDetailTexCoord( Vector<ShaderComponent*> &compon
texMat->constSortPos = cspPass;
}
meta->addStatement( new GenOp( " @ = tMul(@, @) * @;\r\n", outTex, texMat, inTex, detScale ) );
meta->addStatement( new GenOp( " @ = tMul(@, @).xy * @;\r\n", outTex, texMat, inTex, detScale ) );
}
else
{