shadowvar cleanups for scattersky and accumulationVolume

This commit is contained in:
Azaezel 2018-03-13 21:29:09 -05:00
parent 386efa0602
commit 1e65a01cf9
2 changed files with 10 additions and 10 deletions

View file

@ -690,13 +690,13 @@ void ScatterSky::prepRenderImage( SceneRenderState *state )
mMatrixSet->setSceneProjection(GFX->getProjectionMatrix());
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!
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;