orderfix for RTLightingFeatHLSL vert vs pixel shader. the order needs to match, same as network comunicating

This commit is contained in:
AzaezelX 2021-10-03 21:53:16 -05:00
parent a1117b1c41
commit 661a192e87

View file

@ -879,12 +879,10 @@ Var* ShaderFeatureHLSL::getSurface(Vector<ShaderComponent*>& componentList, Mult
meta->addStatement(new GenOp(" @;\r\n\n", new DecOp(normal)));
Var* wsNormal = (Var*)LangElement::find("wsNormal");
if (!fd.features[MFT_NormalMap])
{
if (!wsNormal)
wsNormal = getInWorldNormal(componentList);
meta->addStatement(new GenOp(" @ = normalize( @ );\r\n\n", normal, wsNormal));
}
else
@ -2227,10 +2225,9 @@ void RTLightingFeatHLSL::processPix( Vector<ShaderComponent*> &componentList,
MultiLine *meta = new MultiLine;
// Now the wsPosition and wsView.
Var* worldToTangent = getInWorldToTangent(componentList);
Var* wsNormal = getInWorldNormal(componentList);
Var *wsPosition = getInWsPosition( componentList );
Var* worldToTangent = getInWorldToTangent(componentList);
Var* wsNormal = getInWorldNormal(componentList);
Var *wsView = getWsView( wsPosition, meta );
// Look for a light mask generated from a previous