mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
adds wetness
cliffsnotes: $Core::WetnessTexture = "core/rendering/images/wetMap.png"; //for the influence degree map probes/skylight have a new canDamp boolean, set to off for probes, on for skylight by default. :levelinfo has a dampness multiplier (0-1) kicked up numTextures from 8 to 16 for shaderdata and postfx since that hit the 8 texture-in prior limit, and we've already adopted apis that can handle the higher count
This commit is contained in:
parent
e16351605b
commit
d23ee397e6
31 changed files with 352 additions and 100 deletions
|
|
@ -786,7 +786,6 @@ void Precipitation::unpackUpdate(NetConnection* con, BitStream* stream)
|
|||
mUseWind = stream->readFlag();
|
||||
mFollowCam = stream->readFlag();
|
||||
mAnimateSplashes = stream->readFlag();
|
||||
|
||||
mDropHitMask = dropHitMask |
|
||||
( mDropHitPlayers ? PlayerObjectType : 0 ) |
|
||||
( mDropHitVehicles ? VehicleObjectType : 0 );
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
#include "torqueConfig.h"
|
||||
#include "T3D/accumulationVolume.h"
|
||||
#include "console/typeValidators.h"
|
||||
#include "materials/materialManager.h"
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(LevelInfo);
|
||||
|
||||
|
|
@ -88,7 +90,8 @@ LevelInfo::LevelInfo()
|
|||
mAmbientLightBlendPhase( 1.f ),
|
||||
mSoundAmbience( NULL ),
|
||||
mSoundDistanceModel( SFXDistanceModelLinear ),
|
||||
mSoundscape( NULL )
|
||||
mSoundscape( NULL ),
|
||||
mDampness(0.0)
|
||||
{
|
||||
mFogData.density = 0.0f;
|
||||
mFogData.densityOffset = 0.0f;
|
||||
|
|
@ -120,6 +123,8 @@ LevelInfo::~LevelInfo()
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
FRangeValidator ValiDampnessRange(0.0f, 1.0f);
|
||||
|
||||
void LevelInfo::initPersistFields()
|
||||
{
|
||||
addGroup( "Visibility" );
|
||||
|
|
@ -130,6 +135,8 @@ void LevelInfo::initPersistFields()
|
|||
addField( "decalBias", TypeF32, Offset( mDecalBias, LevelInfo ),
|
||||
"NearPlane bias used when rendering Decal and DecalRoad. This should be tuned to the visibleDistance in your level." );
|
||||
|
||||
addFieldV("dampness", TypeF32, Offset(mDampness, LevelInfo), &ValiDampnessRange,
|
||||
"@brief dampness influence");
|
||||
endGroup( "Visibility" );
|
||||
|
||||
addGroup( "Fog" );
|
||||
|
|
@ -199,6 +206,7 @@ U32 LevelInfo::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
|
|||
stream->write( mNearClip );
|
||||
stream->write( mVisibleDistance );
|
||||
stream->write( mDecalBias );
|
||||
stream->write(mDampness);
|
||||
|
||||
stream->write( mFogData.density );
|
||||
stream->write( mFogData.densityOffset );
|
||||
|
|
@ -229,6 +237,8 @@ void LevelInfo::unpackUpdate(NetConnection *conn, BitStream *stream)
|
|||
stream->read( &mNearClip );
|
||||
stream->read( &mVisibleDistance );
|
||||
stream->read( &mDecalBias );
|
||||
stream->read(&mDampness);
|
||||
MATMGR->setDampness(mDampness);
|
||||
|
||||
stream->read( &mFogData.density );
|
||||
stream->read( &mFogData.densityOffset );
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ class LevelInfo : public NetObject
|
|||
|
||||
///
|
||||
SFXSoundscape* mSoundscape;
|
||||
|
||||
F32 mDampness; ///<applies wetness
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ ReflectionProbe::ReflectionProbe()
|
|||
mEditPosOffset = false;
|
||||
|
||||
mCaptureMask = REFLECTION_PROBE_CAPTURE_TYPEMASK;
|
||||
mCanDamp = false;
|
||||
}
|
||||
|
||||
ReflectionProbe::~ReflectionProbe()
|
||||
|
|
@ -150,6 +151,7 @@ ReflectionProbe::~ReflectionProbe()
|
|||
//-----------------------------------------------------------------------------
|
||||
void ReflectionProbe::initPersistFields()
|
||||
{
|
||||
addField("canDamp", TypeBool, Offset(mCanDamp, ReflectionProbe),"wetness allowed");
|
||||
addGroup("Rendering");
|
||||
addProtectedField("enabled", TypeBool, Offset(mEnabled, ReflectionProbe),
|
||||
&_setEnabled, &defaultProtectedGetFn, "Is the probe enabled or not");
|
||||
|
|
@ -435,6 +437,7 @@ U32 ReflectionProbe::packUpdate(NetConnection *conn, U32 mask, BitStream *stream
|
|||
{
|
||||
stream->writeFlag(mEnabled);
|
||||
}
|
||||
stream->writeFlag(mCanDamp);
|
||||
|
||||
return retMask;
|
||||
}
|
||||
|
|
@ -491,6 +494,7 @@ void ReflectionProbe::unpackUpdate(NetConnection *conn, BitStream *stream)
|
|||
|
||||
mDirty = true;
|
||||
}
|
||||
mCanDamp = stream->readFlag();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -555,7 +559,8 @@ void ReflectionProbe::updateProbeParams()
|
|||
|
||||
mProbeInfo.mProbeRefOffset = mProbeRefOffset;
|
||||
mProbeInfo.mProbeRefScale = mProbeRefScale;
|
||||
|
||||
mProbeInfo.mCanDamp = mCanDamp;
|
||||
|
||||
mProbeInfo.mDirty = true;
|
||||
|
||||
if (mCubemapDirty)
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public:
|
|||
};
|
||||
|
||||
ProbeShapeType mProbeShapeType;
|
||||
|
||||
bool mCanDamp;
|
||||
public:
|
||||
|
||||
ProbeInfo() : mScore(0) {}
|
||||
|
|
@ -255,7 +255,7 @@ protected:
|
|||
|
||||
bool mResourcesCreated;
|
||||
U32 mCaptureMask;
|
||||
|
||||
bool mCanDamp;
|
||||
public:
|
||||
ReflectionProbe();
|
||||
virtual ~ReflectionProbe();
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ ConsoleDocClass(Skylight,
|
|||
Skylight::Skylight() : ReflectionProbe()
|
||||
{
|
||||
mCaptureMask = SKYLIGHT_CAPTURE_TYPEMASK;
|
||||
mCanDamp = true;
|
||||
}
|
||||
|
||||
Skylight::~Skylight()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue