mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
orderfix for RTLightingFeatHLSL vert vs pixel shader. the order needs to match, same as network comunicating
This commit is contained in:
parent
a1117b1c41
commit
661a192e87
1 changed files with 2 additions and 5 deletions
|
|
@ -879,12 +879,10 @@ Var* ShaderFeatureHLSL::getSurface(Vector<ShaderComponent*>& componentList, Mult
|
||||||
meta->addStatement(new GenOp(" @;\r\n\n", new DecOp(normal)));
|
meta->addStatement(new GenOp(" @;\r\n\n", new DecOp(normal)));
|
||||||
|
|
||||||
Var* wsNormal = (Var*)LangElement::find("wsNormal");
|
Var* wsNormal = (Var*)LangElement::find("wsNormal");
|
||||||
|
|
||||||
if (!fd.features[MFT_NormalMap])
|
if (!fd.features[MFT_NormalMap])
|
||||||
{
|
{
|
||||||
if (!wsNormal)
|
if (!wsNormal)
|
||||||
wsNormal = getInWorldNormal(componentList);
|
wsNormal = getInWorldNormal(componentList);
|
||||||
|
|
||||||
meta->addStatement(new GenOp(" @ = normalize( @ );\r\n\n", normal, wsNormal));
|
meta->addStatement(new GenOp(" @ = normalize( @ );\r\n\n", normal, wsNormal));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2227,10 +2225,9 @@ void RTLightingFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
|
||||||
MultiLine *meta = new MultiLine;
|
MultiLine *meta = new MultiLine;
|
||||||
|
|
||||||
// Now the wsPosition and wsView.
|
// Now the wsPosition and wsView.
|
||||||
Var* worldToTangent = getInWorldToTangent(componentList);
|
|
||||||
Var* wsNormal = getInWorldNormal(componentList);
|
|
||||||
Var *wsPosition = getInWsPosition( componentList );
|
Var *wsPosition = getInWsPosition( componentList );
|
||||||
|
Var* worldToTangent = getInWorldToTangent(componentList);
|
||||||
|
Var* wsNormal = getInWorldNormal(componentList);
|
||||||
Var *wsView = getWsView( wsPosition, meta );
|
Var *wsView = getWsView( wsPosition, meta );
|
||||||
|
|
||||||
// Look for a light mask generated from a previous
|
// Look for a light mask generated from a previous
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue