mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
Core implementation of Physical Based Rendering.
This commit is contained in:
parent
d2a78b0a82
commit
ef5e3a5271
148 changed files with 4464 additions and 1016 deletions
|
|
@ -97,7 +97,7 @@ LevelInfo::LevelInfo()
|
|||
|
||||
mNetFlags.set( ScopeAlways | Ghostable );
|
||||
|
||||
mAdvancedLightmapSupport = false;
|
||||
mAdvancedLightmapSupport = true;
|
||||
mAccuTextureName = "";
|
||||
mAccuTexture = NULL;
|
||||
|
||||
|
|
@ -163,8 +163,8 @@ void LevelInfo::initPersistFields()
|
|||
addField( "ambientLightBlendCurve", TypeEaseF, Offset( mAmbientLightBlendCurve, LevelInfo ),
|
||||
"Interpolation curve to use for blending from one ambient light color to a different one." );
|
||||
|
||||
addField( "advancedLightmapSupport", TypeBool, Offset( mAdvancedLightmapSupport, LevelInfo ),
|
||||
"Enable expanded support for mixing static and dynamic lighting (more costly)" );
|
||||
//addField( "advancedLightmapSupport", TypeBool, Offset( mAdvancedLightmapSupport, LevelInfo ),
|
||||
// "Enable expanded support for mixing static and dynamic lighting (more costly)" );
|
||||
|
||||
addProtectedField("AccuTexture", TypeStringFilename, Offset(mAccuTextureName, LevelInfo),
|
||||
&_setLevelAccuTexture, &defaultProtectedGetFn, "Accumulation texture.");
|
||||
|
|
|
|||
|
|
@ -1176,6 +1176,13 @@ void ShapeBase::onRemove()
|
|||
for (S32 i = 0; i < MaxSoundThreads; i++)
|
||||
stopAudio(i);
|
||||
|
||||
// Accumulation and environment mapping
|
||||
if (isClientObject() && mShapeInstance)
|
||||
{
|
||||
if (mShapeInstance->hasAccumulation())
|
||||
AccumulationVolume::removeObject(this);
|
||||
}
|
||||
|
||||
if ( isClientObject() )
|
||||
{
|
||||
mCubeReflector.unregisterReflector();
|
||||
|
|
@ -3724,6 +3731,18 @@ void ShapeBase::setCurrentWaterObject( WaterObject *obj )
|
|||
mCurrentWaterObject = obj;
|
||||
}
|
||||
|
||||
void ShapeBase::setTransform(const MatrixF & mat)
|
||||
{
|
||||
Parent::setTransform(mat);
|
||||
|
||||
// Accumulation and environment mapping
|
||||
if (isClientObject() && mShapeInstance)
|
||||
{
|
||||
if (mShapeInstance->hasAccumulation())
|
||||
AccumulationVolume::updateObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
void ShapeBase::notifyCollisionCallbacks(SceneObject* obj, const VectorF& vel)
|
||||
{
|
||||
for (S32 i = 0; i < collision_callbacks.size(); i++)
|
||||
|
|
|
|||
|
|
@ -1842,7 +1842,7 @@ public:
|
|||
virtual WaterObject* getCurrentWaterObject();
|
||||
|
||||
void setCurrentWaterObject( WaterObject *obj );
|
||||
|
||||
void setTransform(const MatrixF & mat);
|
||||
virtual F32 getMass() const { return mMass; }
|
||||
|
||||
/// @name Network
|
||||
|
|
|
|||
|
|
@ -377,6 +377,10 @@ bool TSStatic::_createShape()
|
|||
resetWorldBox();
|
||||
|
||||
mShapeInstance = new TSShapeInstance( mShape, isClientObject() );
|
||||
if (isClientObject())
|
||||
{
|
||||
mShapeInstance->cloneMaterialList();
|
||||
}
|
||||
|
||||
if (isClientObject())
|
||||
mShapeInstance->cloneMaterialList();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue