mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
Fix SkatterSky flare occlusion.
This commit is contained in:
parent
6338b8cc82
commit
190f68b998
5 changed files with 105 additions and 40 deletions
|
|
@ -658,6 +658,11 @@ void ScatterSky::prepRenderImage( SceneRenderState *state )
|
|||
mFlareState.lightMat.identity();
|
||||
mFlareState.lightMat.setPosition( lightPos );
|
||||
|
||||
F32 dist = ( lightPos - state->getCameraPosition( ) ).len( );
|
||||
F32 coronaScale = 0.5f;
|
||||
F32 screenRadius = GFX->getViewport( ).extent.y * coronaScale * 0.5f;
|
||||
mFlareState.worldRadius = screenRadius * dist / state->getWorldToScreenScale( ).y;
|
||||
|
||||
mFlareData->prepRender( state, &mFlareState );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue