|
@@ -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;
|
|
|
|
|