uninitialized variables-lighting

This commit is contained in:
AzaezelX 2020-05-11 15:07:21 -05:00
parent 9fef1b3cd1
commit f52c3d5ed2
6 changed files with 15 additions and 7 deletions

View file

@ -70,7 +70,7 @@ protected:
GFXStateBlockRef mLitState[NUM_LIT_STATES][2];
public:
LightMatInstance(Material &mat) : Parent(mat), mLightMapParamsSC(NULL), mInternalPass(false) {}
LightMatInstance(Material &mat) : Parent(mat), mLightMapParamsSC(NULL), mInternalPass(false), mSpecialLight(NULL) {}
virtual bool init( const FeatureSet &features, const GFXVertexFormat *vertexFormat );
virtual bool setupPass( SceneRenderState *state, const SceneData &sgData );

View file

@ -63,6 +63,9 @@ AdvancedLightManager::AdvancedLightManager()
{
mLightBinManager = NULL;
mLastShader = NULL;
mLastConstants = NULL;
mSpherePrimitiveCount = 0;
mConePrimitiveCount = 0;
mAvailableSLInterfaces = NULL;
}

View file

@ -55,7 +55,7 @@ BlobShadow::BlobShadow(SceneObject* parentObject, LightInfo* light, TSShapeInsta
mRadius = 0.0f;
mLastRenderTime = 0;
mDepthBias = -0.0002f;
mInvShadowDistance = 1.0f;
generateGenericShadowBitmap(smGenericShadowDim);
setupStateBlocks();
}

View file

@ -440,7 +440,8 @@ SceneLighting::SceneLighting(AvailableSLInterfaces* lightingInterfaces)
mStartTime = 0;
mFileName[0] = '\0';
mSceneManager = NULL;
sgTimeTemp = 0;
sgTimeTemp2 = 0;
// Registering vars more than once doesn't hurt anything.
Con::addVariable("$sceneLighting::terminateLighting", TypeBool, &gTerminateLighting);
Con::addVariable("$sceneLighting::lightingProgress", TypeF32, &gLightingProgress);
@ -1084,4 +1085,4 @@ bool SceneLighting::ObjectProxy::setPersistInfo(PersistInfo::PersistChunk * chun
{
mChunkCRC = chunk->mChunkCRC;
return(true);
}
}

View file

@ -64,8 +64,12 @@ F32 PSSMLightShadowMap::smSmallestVisiblePixelSize = 25.0f;
PSSMLightShadowMap::PSSMLightShadowMap( LightInfo *light )
: LightShadowMap( light ),
mNumSplits( 1 )
{
mNumSplits( 1 ),
mLogWeight(0.91f)
{
for (U32 i = 0; i <= MAX_SPLITS; i++) //% depth distance
mSplitDist[i] = mPow(F32(i/MAX_SPLITS),2.0f);
mIsViewDependent = true;
}

View file

@ -52,7 +52,7 @@ class ShadowMapPass
{
public:
ShadowMapPass() {} // Only called by ConsoleSystem
ShadowMapPass() : mTimer(NULL), mLightManager(NULL), mShadowManager(NULL), mActiveLights(0), mPrevCamFov(90.0f) {} // Only called by ConsoleSystem
ShadowMapPass(LightManager* LightManager, ShadowMapManager* ShadowManager);
virtual ~ShadowMapPass();