mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-18 11:50:57 +00:00
went overzealous on the bitangent cleanup when reviewing parallax. the W multiplier can and should stay. the y flip can remain gone.
This commit is contained in:
parent
630949514a
commit
c6e2563a38
2 changed files with 4 additions and 0 deletions
|
|
@ -67,6 +67,8 @@ LangElement * ShaderFeatureGLSL::setupTexSpaceMat( Vector<ShaderComponent*> &, /
|
|||
{
|
||||
if(dStricmp((char*)T->type, "vec4") == 0)
|
||||
meta->addStatement( new GenOp( " tSetMatrixRow(@, 1, cross( @, normalize(@) ) * @.w);\r\n", *texSpaceMat, T, N, T ) );
|
||||
else if(tangentW)
|
||||
meta->addStatement( new GenOp( " tSetMatrixRow(@, 1, cross( @, normalize(@) ) * @);\r\n", *texSpaceMat, T, N, tangentW ) );
|
||||
else
|
||||
meta->addStatement( new GenOp( " tSetMatrixRow(@, 1, cross( @, normalize(@) ));\r\n", *texSpaceMat, T, N ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ LangElement * ShaderFeatureHLSL::setupTexSpaceMat( Vector<ShaderComponent*> &, /
|
|||
{
|
||||
if(dStricmp((char*)T->type, "float4") == 0)
|
||||
meta->addStatement( new GenOp( " @[1] = cross( @, normalize(@) ) * @.w;\r\n", *texSpaceMat, T, N, T ) );
|
||||
else if (tangentW)
|
||||
meta->addStatement(new GenOp(" @[1] = cross( @, normalize(@) ) * @;\r\n", *texSpaceMat, T, N, tangentW));
|
||||
else
|
||||
meta->addStatement( new GenOp( " @[1] = cross( @, normalize(@) );\r\n", *texSpaceMat, T, N ) );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue