mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
truncation warning cleanups dx side (was also causing cornercase crashes gl side)
This commit is contained in:
parent
8c5810adad
commit
496b6a3ea8
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ Var* ShaderFeatureHLSL::getOutTexCoord( const char *name,
|
|||
|
||||
// Statement allows for casting of different types which
|
||||
// eliminates vector truncation problems.
|
||||
String statement = String::ToString( " @ = (%s)mul(@, @);\r\n", type );
|
||||
String statement = String::ToString( " @ = (%s)mul(@, @).xy;\r\n", type );
|
||||
meta->addStatement( new GenOp( statement, texCoord, texMat, inTex ) );
|
||||
}
|
||||
else
|
||||
|
|
@ -811,7 +811,7 @@ Var* ShaderFeatureHLSL::addOutDetailTexCoord( Vector<ShaderComponent*> &compon
|
|||
texMat->constSortPos = cspPass;
|
||||
}
|
||||
|
||||
meta->addStatement( new GenOp( " @ = mul(@, @) * @;\r\n", outTex, texMat, inTex, detScale ) );
|
||||
meta->addStatement( new GenOp( " @ = mul(@, @).xy * @;\r\n", outTex, texMat, inTex, detScale ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue