mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
sunBokeh feature added
This commit is contained in:
parent
5d52864c9f
commit
637a804fd7
6 changed files with 29 additions and 1 deletions
|
|
@ -655,6 +655,11 @@ void ScatterSky::prepRenderImage( SceneRenderState *state )
|
|||
state->getRenderPass()->addInst( ri );
|
||||
}
|
||||
*/
|
||||
// Screen flare occlusion fix //sunBokeh feature
|
||||
F32 screenRadius = GFX->getViewport().extent.y * mFlareScale * 0.01f;
|
||||
Point3F lightWorldPos = state->getCameraPosition() - state->getFarPlane() * mLight->getDirection() * 0.9f;
|
||||
F32 dist = ( lightWorldPos - state->getCameraPosition() ).len();
|
||||
mFlareState.worldRadius = screenRadius * dist / state->getWorldToScreenScale().y;
|
||||
|
||||
// Light flare effect render instance.
|
||||
if ( mFlareData && mNightInterpolant != 1.0f )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue