mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-02 03:53:50 +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
|
|
@ -144,6 +144,8 @@ ScatterSky::ScatterSky()
|
|||
mBrightness = 1.0f;
|
||||
|
||||
mCastShadows = true;
|
||||
mStaticRefreshFreq = 8;
|
||||
mDynamicRefreshFreq = 8;
|
||||
mDirty = true;
|
||||
|
||||
mLight = LightManager::createLightInfo();
|
||||
|
|
@ -264,6 +266,8 @@ void ScatterSky::_conformLights()
|
|||
mLight->setAmbient( mAmbientColor );
|
||||
mLight->setColor( mSunColor );
|
||||
mLight->setCastShadows( mCastShadows );
|
||||
mLight->setStaticRefreshFreq(mStaticRefreshFreq);
|
||||
mLight->setDynamicRefreshFreq(mDynamicRefreshFreq);
|
||||
|
||||
FogData fog = getSceneManager()->getFogData();
|
||||
fog.color = mFogColor;
|
||||
|
|
@ -374,6 +378,9 @@ void ScatterSky::initPersistFields()
|
|||
addField( "castShadows", TypeBool, Offset( mCastShadows, ScatterSky ),
|
||||
"Enables/disables shadows cast by objects due to ScatterSky light." );
|
||||
|
||||
addField("staticRefreshFreq", TypeS32, Offset(mStaticRefreshFreq, ScatterSky), "static shadow refresh rate (milliseconds)");
|
||||
addField("dynamicRefreshFreq", TypeS32, Offset(mDynamicRefreshFreq, ScatterSky), "dynamic shadow refresh rate (milliseconds)");
|
||||
|
||||
addField( "brightness", TypeF32, Offset( mBrightness, ScatterSky ),
|
||||
"The brightness of the ScatterSky's light object." );
|
||||
|
||||
|
|
@ -480,6 +487,8 @@ U32 ScatterSky::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
|||
stream->write( mBrightness );
|
||||
|
||||
stream->writeFlag( mCastShadows );
|
||||
stream->write(mStaticRefreshFreq);
|
||||
stream->write(mDynamicRefreshFreq);
|
||||
|
||||
stream->write( mFlareScale );
|
||||
|
||||
|
|
@ -581,6 +590,8 @@ void ScatterSky::unpackUpdate(NetConnection *con, BitStream *stream)
|
|||
stream->read( &mBrightness );
|
||||
|
||||
mCastShadows = stream->readFlag();
|
||||
stream->read(&mStaticRefreshFreq);
|
||||
stream->read(&mDynamicRefreshFreq);
|
||||
|
||||
stream->read( &mFlareScale );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue