mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-25 17:43:44 +00:00
cleans up a few more spots of various variables that ammount to the "PBRConfig" in the end, as well as a MFT_isDeferred test for determining if that's stored off as a temp-val or in the gbuffer. though seem to have forgotten a catch, as it's not finding the MFT_PBRConfigMap feature and falling back to recreation come time to process MFT_ReflectionProbes
This commit is contained in:
parent
fe335128c1
commit
92efdb0d86
5 changed files with 96 additions and 63 deletions
|
|
@ -837,8 +837,8 @@ Var* ShaderFeatureGLSL::getSurface(Vector<ShaderComponent*>& componentList, Mult
|
|||
|
||||
Var* diffuseColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));
|
||||
|
||||
Var* matinfo = (Var*)LangElement::find("PBRConfig");
|
||||
if (!matinfo)
|
||||
Var* pbrConfig = (Var*)LangElement::find("PBRConfig");
|
||||
if (!pbrConfig)
|
||||
{
|
||||
Var* metalness = (Var*)LangElement::find("metalness");
|
||||
if (!metalness)
|
||||
|
|
@ -856,9 +856,9 @@ Var* ShaderFeatureGLSL::getSurface(Vector<ShaderComponent*>& componentList, Mult
|
|||
smoothness->constSortPos = cspPotentialPrimitive;
|
||||
}
|
||||
|
||||
matinfo = new Var("PBRConfig", "vec4");
|
||||
LangElement* colorDecl = new DecOp(matinfo);
|
||||
meta->addStatement(new GenOp(" @ = vec4(0.0,1.0,@,@);\r\n", colorDecl, smoothness, metalness)); //reconstruct matinfo, no ao darkening
|
||||
pbrConfig = new Var("PBRConfig", "vec4");
|
||||
LangElement* colorDecl = new DecOp(pbrConfig);
|
||||
meta->addStatement(new GenOp(" @ = vec4(0.0,1.0,@,@);\r\n", colorDecl, smoothness, metalness)); //reconstruct pbrConfig, no ao darkening
|
||||
}
|
||||
|
||||
Var* wsNormal = (Var*)LangElement::find("wsNormal");
|
||||
|
|
@ -895,7 +895,7 @@ Var* ShaderFeatureGLSL::getSurface(Vector<ShaderComponent*>& componentList, Mult
|
|||
if (!surface)
|
||||
{
|
||||
surface = new Var("surface", "Surface");
|
||||
meta->addStatement(new GenOp(" @ = createForwardSurface(@,@,@,@,@,@);\r\n\n", new DecOp(surface), diffuseColor, normal, matinfo,
|
||||
meta->addStatement(new GenOp(" @ = createForwardSurface(@,@,@,@,@,@);\r\n\n", new DecOp(surface), diffuseColor, normal, pbrConfig,
|
||||
wsPosition, wsEyePos, wsView));
|
||||
}
|
||||
|
||||
|
|
@ -3046,13 +3046,7 @@ void ReflectionProbeFeatGLSL::processPix(Vector<ShaderComponent*>& componentList
|
|||
}
|
||||
|
||||
Var *curColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));
|
||||
|
||||
Var *matinfo = (Var*)LangElement::find("PBRConfig");
|
||||
Var* metalness = (Var*)LangElement::find("metalness");
|
||||
Var* smoothness = (Var*)LangElement::find("smoothness");
|
||||
|
||||
Var* wsEyePos = (Var*)LangElement::find("eyePosWorld");
|
||||
|
||||
|
||||
//Reflection vec
|
||||
String computeForwardProbes = String(" @.rgb = computeForwardProbes(@,@,@,@,@,@,@,@,@,\r\n\t\t");
|
||||
computeForwardProbes += String("@,@,\r\n\t\t");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue