mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +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
|
|
@ -30,7 +30,6 @@ ImplementFeatureType( MFT_VertTransform, MFG_Transform, 0, true );
|
|||
|
||||
ImplementFeatureType( MFT_TexAnim, MFG_PreTexture, 1.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_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_DetailMap, MFG_Texture, 4.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_SpecularMap, MFG_Texture, 8.0f, true );
|
||||
ImplementFeatureType( MFT_NormalMap, MFG_Texture, 9.0f, true );
|
||||
|
|
|
|||
|
|
@ -1194,7 +1194,10 @@ void DiffuseVertColorFeatureGLSL::processPix( Vector<ShaderComponent*> &compon
|
|||
}
|
||||
|
||||
MultiLine* meta = new MultiLine;
|
||||
meta->addStatement( new GenOp( " @;\r\n", assignColor( vertColor, Material::Mul ) ) );
|
||||
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)));
|
||||
output = meta;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1258,7 +1258,10 @@ void DiffuseVertColorFeatureHLSL::processPix( Vector<ShaderComponent*> &compon
|
|||
}
|
||||
|
||||
MultiLine* meta = new MultiLine;
|
||||
meta->addStatement( new GenOp( " @;\r\n", assignColor( vertColor, Material::Mul ) ) );
|
||||
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)));
|
||||
output = meta;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue