mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Added support for uniforms, textures and samplers.
This commit is contained in:
parent
5019478aad
commit
74138342d1
7 changed files with 235 additions and 9 deletions
|
|
@ -285,6 +285,31 @@ void ShaderGen::_processVertFeatures( Vector<GFXShaderMacro> ¯os, bool macro
|
|||
}
|
||||
}
|
||||
|
||||
//Handle if we have any custom features
|
||||
if (!mCustomFeaturesData.empty())
|
||||
{
|
||||
for (U32 i = 0; i < mCustomFeaturesData.size(); ++i)
|
||||
{
|
||||
mCustomFeaturesData[i]->mFeatureHLSL->processVert(mComponents, mFeatureData);
|
||||
|
||||
String line = String::ToString(" // %s\r\n", mCustomFeaturesData[i]->mFeatureHLSL->getName().c_str());
|
||||
mOutput->addStatement(new GenOp(line));
|
||||
|
||||
if (mCustomFeaturesData[i]->mFeatureHLSL->getOutput())
|
||||
mOutput->addStatement(mCustomFeaturesData[i]->mFeatureHLSL->getOutput());
|
||||
//ShaderFeatureHLSL feature = mCustomFeaturesData[i]->mHLSLFeature;
|
||||
//feature->setProcessIndex(index);
|
||||
|
||||
/*feature->processPixMacros(macros, mFeatureData);
|
||||
|
||||
feature->setInstancingFormat(&mInstancingFormat);
|
||||
feature->processPix(mComponents, mFeatureData);*/
|
||||
|
||||
mCustomFeaturesData[i]->mFeatureHLSL->reset();
|
||||
mOutput->addStatement(new GenOp(" \r\n"));
|
||||
}
|
||||
}
|
||||
|
||||
ShaderConnector *connect = dynamic_cast<ShaderConnector *>( mComponents[C_CONNECTOR] );
|
||||
connect->sortVars();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue