mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
shadowvar cleanups for scattersky and accumulationVolume
This commit is contained in:
parent
386efa0602
commit
1e65a01cf9
2 changed files with 10 additions and 10 deletions
|
|
@ -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 );
|
mWSPoints.setSize(numPolyPoints);
|
||||||
for( U32 i = 0; i < numPoints; ++ i )
|
for( U32 i = 0; i < numPolyPoints; ++ i )
|
||||||
{
|
{
|
||||||
Point3F p = points[ i ];
|
Point3F p = points[ i ];
|
||||||
p.convolve( getScale() );
|
p.convolve( getScale() );
|
||||||
|
|
|
||||||
|
|
@ -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>();
|
ObjectRenderInst *moonRI = renderPass->allocInst<ObjectRenderInst>();
|
||||||
ri->renderDelegate.bind( this, &ScatterSky::_renderMoon );
|
moonRI->renderDelegate.bind( this, &ScatterSky::_renderMoon );
|
||||||
ri->type = RenderPassManager::RIT_Sky;
|
moonRI->type = RenderPassManager::RIT_Sky;
|
||||||
// Render after sky objects and before CloudLayer!
|
// Render after sky objects and before CloudLayer!
|
||||||
ri->defaultKey = 5;
|
moonRI->defaultKey = 5;
|
||||||
ri->defaultKey2 = 0;
|
moonRI->defaultKey2 = 0;
|
||||||
renderPass->addInst(ri);
|
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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue