|
@@ -124,6 +124,8 @@ TSStatic::TSStatic()
|
|
|
|
|
|
mCollisionType = CollisionMesh;
|
|
mCollisionType = CollisionMesh;
|
|
mDecalType = CollisionMesh;
|
|
mDecalType = CollisionMesh;
|
|
|
|
+
|
|
|
|
+ mOverrideColor = LinearColorF::BLACK;
|
|
}
|
|
}
|
|
|
|
|
|
TSStatic::~TSStatic()
|
|
TSStatic::~TSStatic()
|
|
@@ -187,6 +189,9 @@ void TSStatic::initPersistFields()
|
|
addField( "originSort", TypeBool, Offset( mUseOriginSort, TSStatic ),
|
|
addField( "originSort", TypeBool, Offset( mUseOriginSort, TSStatic ),
|
|
"Enables translucent sorting of the TSStatic by its origin instead of the bounds." );
|
|
"Enables translucent sorting of the TSStatic by its origin instead of the bounds." );
|
|
|
|
|
|
|
|
+ addField("overrideColor", TypeColorF, Offset(mOverrideColor, TSStatic),
|
|
|
|
+ "@brief The skin applied to the shape.\n\n");
|
|
|
|
+
|
|
endGroup("Rendering");
|
|
endGroup("Rendering");
|
|
|
|
|
|
addGroup( "Reflection" );
|
|
addGroup( "Reflection" );
|
|
@@ -306,8 +311,6 @@ bool TSStatic::onAdd()
|
|
|
|
|
|
if ( reflectorDesc )
|
|
if ( reflectorDesc )
|
|
mCubeReflector.registerReflector( this, reflectorDesc );
|
|
mCubeReflector.registerReflector( this, reflectorDesc );
|
|
-
|
|
|
|
- strudelCSB = new CustomShaderBindingData();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
_updateShouldTick();
|
|
_updateShouldTick();
|
|
@@ -630,7 +633,8 @@ void TSStatic::prepRenderImage( SceneRenderState* state )
|
|
rdata.setAccuTex(mAccuTex);
|
|
rdata.setAccuTex(mAccuTex);
|
|
|
|
|
|
//Various arbitrary shader render bits to add
|
|
//Various arbitrary shader render bits to add
|
|
- strudelCSB->setFloat("strudel", 0.25);
|
|
|
|
|
|
+ CustomShaderBindingData strudelCSB;
|
|
|
|
+ strudelCSB.setFloat4(StringTable->insert("overrideColor"), mOverrideColor);
|
|
|
|
|
|
rdata.addCustomShaderBinding(strudelCSB);
|
|
rdata.addCustomShaderBinding(strudelCSB);
|
|
|
|
|
|
@@ -800,6 +804,8 @@ U32 TSStatic::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|
{
|
|
{
|
|
stream->writeRangedU32( reflectorDesc->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast );
|
|
stream->writeRangedU32( reflectorDesc->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast );
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ stream->write(mOverrideColor);
|
|
return retMask;
|
|
return retMask;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -887,6 +893,8 @@ void TSStatic::unpackUpdate(NetConnection *con, BitStream *stream)
|
|
cubeDescId = stream->readRangedU32( DataBlockObjectIdFirst, DataBlockObjectIdLast );
|
|
cubeDescId = stream->readRangedU32( DataBlockObjectIdFirst, DataBlockObjectIdLast );
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ stream->read(&mOverrideColor);
|
|
|
|
+
|
|
if ( isProperlyAdded() )
|
|
if ( isProperlyAdded() )
|
|
_updateShouldTick();
|
|
_updateShouldTick();
|
|
}
|
|
}
|