mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
puts forward-lit #targetname assignment of faux diffuse maps back
This commit is contained in:
parent
5122360552
commit
702e63cb0c
1 changed files with 13 additions and 0 deletions
|
|
@ -211,6 +211,19 @@ bool ProcessedShaderMaterial::init( const FeatureSet &features,
|
||||||
mInstancingState = new InstancingState();
|
mInstancingState = new InstancingState();
|
||||||
mInstancingState->setFormat( _getRPD( 0 )->shader->getInstancingFormat(), mVertexFormat );
|
mInstancingState->setFormat( _getRPD( 0 )->shader->getInstancingFormat(), mVertexFormat );
|
||||||
}
|
}
|
||||||
|
if (mMaterial && mMaterial->mDiffuseMapFilename[0].isNotEmpty() && mMaterial->mDiffuseMapFilename[0].substr(0, 1).equal("#"))
|
||||||
|
{
|
||||||
|
String texTargetBufferName = mMaterial->mDiffuseMapFilename[0].substr(1, mMaterial->mDiffuseMapFilename[0].length() - 1);
|
||||||
|
NamedTexTarget *texTarget = NamedTexTarget::find(texTargetBufferName);
|
||||||
|
RenderPassData* rpd = getPass(0);
|
||||||
|
|
||||||
|
if (rpd)
|
||||||
|
{
|
||||||
|
rpd->mTexSlot[0].texTarget = texTarget;
|
||||||
|
rpd->mTexType[0] = Material::TexTarget;
|
||||||
|
rpd->mSamplerNames[0] = "diffuseMap";
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue