mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
Fixes vertcolor code insertion order, and applies it adaptively based on defered or forward lit context
This commit is contained in:
parent
f66a14c6e1
commit
942235d114
3 changed files with 9 additions and 3 deletions
|
|
@ -30,7 +30,6 @@ ImplementFeatureType( MFT_VertTransform, MFG_Transform, 0, true );
|
||||||
|
|
||||||
ImplementFeatureType( MFT_TexAnim, MFG_PreTexture, 1.0f, true );
|
ImplementFeatureType( MFT_TexAnim, MFG_PreTexture, 1.0f, true );
|
||||||
ImplementFeatureType( MFT_Parallax, MFG_PreTexture, 2.0f, true );
|
ImplementFeatureType( MFT_Parallax, MFG_PreTexture, 2.0f, true );
|
||||||
ImplementFeatureType( MFT_DiffuseVertColor, MFG_PreTexture, 3.0f, true );
|
|
||||||
|
|
||||||
ImplementFeatureType( MFT_AccuScale, MFG_PreTexture, 4.0f, true );
|
ImplementFeatureType( MFT_AccuScale, MFG_PreTexture, 4.0f, true );
|
||||||
ImplementFeatureType( MFT_AccuDirection, MFG_PreTexture, 4.0f, true );
|
ImplementFeatureType( MFT_AccuDirection, MFG_PreTexture, 4.0f, true );
|
||||||
|
|
@ -42,6 +41,7 @@ ImplementFeatureType( MFT_DiffuseMap, MFG_Texture, 2.0f, true );
|
||||||
ImplementFeatureType( MFT_OverlayMap, MFG_Texture, 3.0f, true );
|
ImplementFeatureType( MFT_OverlayMap, MFG_Texture, 3.0f, true );
|
||||||
ImplementFeatureType( MFT_DetailMap, MFG_Texture, 4.0f, true );
|
ImplementFeatureType( MFT_DetailMap, MFG_Texture, 4.0f, true );
|
||||||
ImplementFeatureType( MFT_DiffuseColor, MFG_Texture, 5.0f, true );
|
ImplementFeatureType( MFT_DiffuseColor, MFG_Texture, 5.0f, true );
|
||||||
|
ImplementFeatureType( MFT_DiffuseVertColor, MFG_Texture, 6.0f, true );
|
||||||
ImplementFeatureType( MFT_AlphaTest, MFG_Texture, 7.0f, true );
|
ImplementFeatureType( MFT_AlphaTest, MFG_Texture, 7.0f, true );
|
||||||
ImplementFeatureType( MFT_SpecularMap, MFG_Texture, 8.0f, true );
|
ImplementFeatureType( MFT_SpecularMap, MFG_Texture, 8.0f, true );
|
||||||
ImplementFeatureType( MFT_NormalMap, MFG_Texture, 9.0f, true );
|
ImplementFeatureType( MFT_NormalMap, MFG_Texture, 9.0f, true );
|
||||||
|
|
|
||||||
|
|
@ -1194,6 +1194,9 @@ void DiffuseVertColorFeatureGLSL::processPix( Vector<ShaderComponent*> &compon
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiLine* meta = new MultiLine;
|
MultiLine* meta = new MultiLine;
|
||||||
|
if (fd.features[MFT_isDeferred])
|
||||||
|
meta->addStatement(new GenOp(" @;\r\n", assignColor(vertColor, Material::Mul, NULL, ShaderFeature::RenderTarget1)));
|
||||||
|
else
|
||||||
meta->addStatement(new GenOp(" @;\r\n", assignColor(vertColor, Material::Mul)));
|
meta->addStatement(new GenOp(" @;\r\n", assignColor(vertColor, Material::Mul)));
|
||||||
output = meta;
|
output = meta;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1258,6 +1258,9 @@ void DiffuseVertColorFeatureHLSL::processPix( Vector<ShaderComponent*> &compon
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiLine* meta = new MultiLine;
|
MultiLine* meta = new MultiLine;
|
||||||
|
if (fd.features[MFT_isDeferred])
|
||||||
|
meta->addStatement(new GenOp(" @;\r\n", assignColor(vertColor, Material::Mul, NULL, ShaderFeature::RenderTarget1)));
|
||||||
|
else
|
||||||
meta->addStatement(new GenOp(" @;\r\n", assignColor(vertColor, Material::Mul)));
|
meta->addStatement(new GenOp(" @;\r\n", assignColor(vertColor, Material::Mul)));
|
||||||
output = meta;
|
output = meta;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue