sunbokeh partly fix, still needs work

This commit is contained in:
Duion 2016-06-21 12:05:21 +02:00
parent 5b62df81c7
commit 5f2ab23fac
6 changed files with 83 additions and 21 deletions

View file

@ -121,7 +121,6 @@ LightFlareData::LightFlareData()
mElementCount( 0 ),
mScale( 1.0f ),
mOcclusionRadius( 0.0f ),
mVisibility( 1.0f ), //sunBokeh feature
mRenderReflectPass( true )
{
dMemset( mElementRect, 0, sizeof( RectF ) * MAX_ELEMENTS );
@ -446,8 +445,6 @@ void LightFlareData::prepRender( SceneRenderState *state, LightFlareState *flare
const RectI &viewport = GFX->getViewport();
Point3F oneOverViewportExtent( 1.0f / (F32)viewport.extent.x, 1.0f / (F32)viewport.extent.y, 0.0f );
// Sun visibility, assume 0 at start of frame
mVisibility = 0; //sunBokeh feature
// Really convert it to screen space.
lightPosSS.x -= viewport.point.x;
lightPosSS.y -= viewport.point.y;
@ -517,7 +514,6 @@ void LightFlareData::prepRender( SceneRenderState *state, LightFlareState *flare
// These are the factors which affect the "alpha" of the flare effect.
// Modulate more in as appropriate.
ColorF baseColor = ColorF::WHITE * lightSourceBrightnessScale * occlusionFade;
mVisibility = lightSourceBrightnessScale * fadeInOutScale * occlusionFade; //sunBokeh feature
// Setup the vertex buffer for the maximum flare elements.
const U32 vertCount = 4 * mElementCount;