Browse Source

shadowvar cleanups for scattersky and accumulationVolume

Azaezel 7 years ago
parent
commit
1e65a01cf9

+ 3 - 3
Engine/source/T3D/accumulationVolume.cpp

@@ -206,11 +206,11 @@ void AccumulationVolume::buildSilhouette( const SceneCameraState& cameraState, V
 
 
    if( mTransformDirty )
    if( mTransformDirty )
    {
    {
-      const U32 numPoints = mPolyhedron.getNumPoints();
+      const U32 numPolyPoints = mPolyhedron.getNumPoints();
       const PolyhedronType::PointType* points = getPolyhedron().getPoints();
       const PolyhedronType::PointType* points = getPolyhedron().getPoints();
 
 
-      mWSPoints.setSize( numPoints );
-      for( U32 i = 0; i < numPoints; ++ i )
+      mWSPoints.setSize(numPolyPoints);
+      for( U32 i = 0; i < numPolyPoints; ++ i )
       {
       {
          Point3F p = points[ i ];
          Point3F p = points[ i ];
          p.convolve( getScale() );
          p.convolve( getScale() );

+ 7 - 7
Engine/source/environment/scatterSky.cpp

@@ -690,13 +690,13 @@ void ScatterSky::prepRenderImage( SceneRenderState *state )
       mMatrixSet->setSceneProjection(GFX->getProjectionMatrix());
       mMatrixSet->setSceneProjection(GFX->getProjectionMatrix());
       mMatrixSet->setWorld(GFX->getWorldMatrix());
       mMatrixSet->setWorld(GFX->getWorldMatrix());
 
 
-      ObjectRenderInst *ri = renderPass->allocInst<ObjectRenderInst>();
-      ri->renderDelegate.bind( this, &ScatterSky::_renderMoon );
-      ri->type = RenderPassManager::RIT_Sky;
+      ObjectRenderInst *moonRI = renderPass->allocInst<ObjectRenderInst>();
+	  moonRI->renderDelegate.bind( this, &ScatterSky::_renderMoon );
+	  moonRI->type = RenderPassManager::RIT_Sky;
       // Render after sky objects and before CloudLayer!
       // Render after sky objects and before CloudLayer!
-      ri->defaultKey = 5;
-      ri->defaultKey2 = 0;
-      renderPass->addInst(ri);
+	  moonRI->defaultKey = 5;
+	  moonRI->defaultKey2 = 0;
+      renderPass->addInst(moonRI);
    }
    }
 }
 }
 
 
@@ -1346,7 +1346,7 @@ void ScatterSky::_getColor( const Point3F &pos, LinearColorF *outColor )
    for ( U32 i = 0; i < 2; i++ )
    for ( U32 i = 0; i < 2; i++ )
    {
    {
       F32 fHeight = v3SamplePoint.len();
       F32 fHeight = v3SamplePoint.len();
-      F32 fDepth = mExp( scaleOverScaleDepth * (mSphereInnerRadius - smViewerHeight) );
+      fDepth = mExp( scaleOverScaleDepth * (mSphereInnerRadius - smViewerHeight) );
       F32 fLightAngle = mDot( mLightDir, v3SamplePoint ) / fHeight;
       F32 fLightAngle = mDot( mLightDir, v3SamplePoint ) / fHeight;
       F32 fCameraAngle = mDot( v3Ray, v3SamplePoint ) / fHeight;
       F32 fCameraAngle = mDot( v3Ray, v3SamplePoint ) / fHeight;