mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
defaults for diffusecolor, specularcolor (reminder todo: shift that to composite) and normal for createForwardSurface
This commit is contained in:
parent
ce4220ad55
commit
b64b84b843
1 changed files with 21 additions and 3 deletions
|
|
@ -3169,15 +3169,33 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
|
||||||
|
|
||||||
Var *diffuseColor = (Var*)LangElement::find("diffuseColor");
|
Var *diffuseColor = (Var*)LangElement::find("diffuseColor");
|
||||||
if (!diffuseColor)
|
if (!diffuseColor)
|
||||||
return;
|
{
|
||||||
|
diffuseColor = new Var;
|
||||||
|
diffuseColor->setType("float4");
|
||||||
|
diffuseColor->setName("diffuseColor");
|
||||||
|
LangElement* colorDecl = new DecOp(diffuseColor);
|
||||||
|
meta->addStatement(new GenOp(" @ = float4(1.0,1.0,1.0,1.0);\r\n", colorDecl)); //default to flat white
|
||||||
|
}
|
||||||
|
|
||||||
Var *specularColor = (Var*)LangElement::find("specularColor");
|
Var *specularColor = (Var*)LangElement::find("specularColor");
|
||||||
if (!specularColor)
|
if (!specularColor)
|
||||||
return;
|
{
|
||||||
|
specularColor = new Var;
|
||||||
|
specularColor->setType("float4");
|
||||||
|
specularColor->setName("specularColor");
|
||||||
|
LangElement* colorDecl = new DecOp(specularColor);
|
||||||
|
meta->addStatement(new GenOp(" @ = float4(0.0,0.0,1.0,0.0);\r\n", colorDecl)); //default to no flag, no rough or metal, no ao darkening
|
||||||
|
}
|
||||||
|
|
||||||
Var *bumpNormal = (Var*)LangElement::find("bumpNormal");
|
Var *bumpNormal = (Var*)LangElement::find("bumpNormal");
|
||||||
if (!bumpNormal)
|
if (!bumpNormal)
|
||||||
return;
|
{
|
||||||
|
bumpNormal = new Var;
|
||||||
|
bumpNormal->setType("float4");
|
||||||
|
bumpNormal->setName("bumpNormal");
|
||||||
|
LangElement* colorDecl = new DecOp(bumpNormal);
|
||||||
|
meta->addStatement(new GenOp(" @ = float4(1.0,0.0,0.0,0.0);\r\n", colorDecl)); //default to identiry normal
|
||||||
|
}
|
||||||
|
|
||||||
Var *wsEyePos = (Var*)LangElement::find("eyePosWorld");
|
Var *wsEyePos = (Var*)LangElement::find("eyePosWorld");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue