Merge branch 'ModernEditorLayoutWIP' of https://github.com/Areloch/Torque3D into development

This commit is contained in:
Areloch 2019-05-13 00:28:23 -05:00
commit 3697737498
148 changed files with 3463 additions and 547 deletions

View file

@ -680,10 +680,30 @@ void TSStatic::prepRenderImage( SceneRenderState* state )
rdata.setAccuTex(mAccuTex);
//Various arbitrary shader render bits to add
CustomShaderBindingData strudelCSB;
strudelCSB.setFloat4(StringTable->insert("overrideColor"), mOverrideColor);
if (mCustomShaderBinds.empty())
{
CustomShaderBindingData minBnds;
minBnds.setFloat3(StringTable->insert("objectBoundsMin"), getWorldBox().minExtents);
mCustomShaderBinds.push_back(minBnds);
rdata.addCustomShaderBinding(strudelCSB);
CustomShaderBindingData maxBnds;
maxBnds.setFloat3(StringTable->insert("objectBoundsMax"), getWorldBox().maxExtents);
mCustomShaderBinds.push_back(maxBnds);
CustomShaderBindingData colorMin;
colorMin.setFloat3(StringTable->insert("colorMin"), Point3F(1,0,0));
mCustomShaderBinds.push_back(colorMin);
CustomShaderBindingData colorMax;
colorMax.setFloat3(StringTable->insert("colorMax"), Point3F(0, 1, 0));
mCustomShaderBinds.push_back(colorMax);
}
if (!mCustomShaderBinds.empty())
{
for(U32 i=0; i < mCustomShaderBinds.size(); i++)
rdata.addCustomShaderBinding(mCustomShaderBinds[i]);
}
// If we have submesh culling enabled then prepare
// the object space frustum to pass to the shape.