From 1e65a01cf9c5536d8efff52b24f22da794c2e514 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 13 Mar 2018 21:29:09 -0500 Subject: [PATCH] shadowvar cleanups for scattersky and accumulationVolume --- Engine/source/T3D/accumulationVolume.cpp | 6 +++--- Engine/source/environment/scatterSky.cpp | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Engine/source/T3D/accumulationVolume.cpp b/Engine/source/T3D/accumulationVolume.cpp index 2d44d7178..4c2e8b009 100644 --- a/Engine/source/T3D/accumulationVolume.cpp +++ b/Engine/source/T3D/accumulationVolume.cpp @@ -206,11 +206,11 @@ void AccumulationVolume::buildSilhouette( const SceneCameraState& cameraState, V if( mTransformDirty ) { - const U32 numPoints = mPolyhedron.getNumPoints(); + const U32 numPolyPoints = mPolyhedron.getNumPoints(); 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 ]; p.convolve( getScale() ); diff --git a/Engine/source/environment/scatterSky.cpp b/Engine/source/environment/scatterSky.cpp index 1b3a60843..2f8d17d00 100644 --- a/Engine/source/environment/scatterSky.cpp +++ b/Engine/source/environment/scatterSky.cpp @@ -690,13 +690,13 @@ void ScatterSky::prepRenderImage( SceneRenderState *state ) mMatrixSet->setSceneProjection(GFX->getProjectionMatrix()); mMatrixSet->setWorld(GFX->getWorldMatrix()); - ObjectRenderInst *ri = renderPass->allocInst(); - ri->renderDelegate.bind( this, &ScatterSky::_renderMoon ); - ri->type = RenderPassManager::RIT_Sky; + ObjectRenderInst *moonRI = renderPass->allocInst(); + moonRI->renderDelegate.bind( this, &ScatterSky::_renderMoon ); + moonRI->type = RenderPassManager::RIT_Sky; // 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++ ) { F32 fHeight = v3SamplePoint.len(); - F32 fDepth = mExp( scaleOverScaleDepth * (mSphereInnerRadius - smViewerHeight) ); + fDepth = mExp( scaleOverScaleDepth * (mSphereInnerRadius - smViewerHeight) ); F32 fLightAngle = mDot( mLightDir, v3SamplePoint ) / fHeight; F32 fCameraAngle = mDot( v3Ray, v3SamplePoint ) / fHeight;