mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge pull request #1442 from Azaezel/shadow_caching
This all seems to work pretty well.
This commit is contained in:
commit
92aa785bb2
61 changed files with 1490 additions and 466 deletions
|
|
@ -60,6 +60,8 @@ LightBase::LightBase()
|
|||
mColor( ColorF::WHITE ),
|
||||
mBrightness( 1.0f ),
|
||||
mCastShadows( false ),
|
||||
mStaticRefreshFreq( 250 ),
|
||||
mDynamicRefreshFreq( 8 ),
|
||||
mPriority( 1.0f ),
|
||||
mAnimationData( NULL ),
|
||||
mFlareData( NULL ),
|
||||
|
|
@ -90,6 +92,8 @@ void LightBase::initPersistFields()
|
|||
addField( "color", TypeColorF, Offset( mColor, LightBase ), "Changes the base color hue of the light." );
|
||||
addField( "brightness", TypeF32, Offset( mBrightness, LightBase ), "Adjusts the lights power, 0 being off completely." );
|
||||
addField( "castShadows", TypeBool, Offset( mCastShadows, LightBase ), "Enables/disabled shadow casts by this light." );
|
||||
addField( "staticRefreshFreq", TypeS32, Offset( mStaticRefreshFreq, LightBase ), "static shadow refresh rate (milliseconds)" );
|
||||
addField( "dynamicRefreshFreq", TypeS32, Offset( mDynamicRefreshFreq, LightBase ), "dynamic shadow refresh rate (milliseconds)" );
|
||||
addField( "priority", TypeF32, Offset( mPriority, LightBase ), "Used for sorting of lights by the light manager. "
|
||||
"Priority determines if a light has a stronger effect than, those with a lower value" );
|
||||
|
||||
|
|
@ -277,6 +281,8 @@ U32 LightBase::packUpdate( NetConnection *conn, U32 mask, BitStream *stream )
|
|||
stream->write( mBrightness );
|
||||
|
||||
stream->writeFlag( mCastShadows );
|
||||
stream->write(mStaticRefreshFreq);
|
||||
stream->write(mDynamicRefreshFreq);
|
||||
|
||||
stream->write( mPriority );
|
||||
|
||||
|
|
@ -322,6 +328,8 @@ void LightBase::unpackUpdate( NetConnection *conn, BitStream *stream )
|
|||
stream->read( &mColor );
|
||||
stream->read( &mBrightness );
|
||||
mCastShadows = stream->readFlag();
|
||||
stream->read(&mStaticRefreshFreq);
|
||||
stream->read(&mDynamicRefreshFreq);
|
||||
|
||||
stream->read( &mPriority );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue