This commit is contained in:
Robert Beckebans 2016-01-09 20:17:09 +01:00
parent e8826caae8
commit b0f5f51f4c
2 changed files with 20 additions and 10 deletions

View file

@ -34,7 +34,7 @@ Contains the RenderLog declaration.
================================================================================================
*/
#if 1// defined(ID_RETAIL) && !defined(ID_RETAIL_INTERNAL)
#if defined(ID_RETAIL) && !defined(ID_RETAIL_INTERNAL)
#define STUB_RENDER_LOG
#endif

View file

@ -1754,13 +1754,19 @@ RB_AmbientPass
*/
static void RB_AmbientPass( const drawSurf_t* const* drawSurfs, int numDrawSurfs, bool fillGbuffer )
{
if( fillGbuffer && !r_useSSGI.GetBool() )
if( fillGbuffer )
{
return;
if( !r_useSSGI.GetBool() )
{
return;
}
}
else if( r_forceAmbient.GetFloat() <= 0 || r_skipAmbient.GetBool() )
else
{
return;
if( r_forceAmbient.GetFloat() <= 0 || r_skipAmbient.GetBool() )
{
return;
}
}
if( numDrawSurfs == 0 )
@ -4510,9 +4516,9 @@ static void RB_Bloom( const viewDef_t* viewDef )
}
void RB_SSAO()
static void RB_SSAO( const viewDef_t* viewDef )
{
if( !backEnd.viewDef->viewEntitys )
if( !viewDef->viewEntitys || viewDef->is2Dgui )
{
// 3D views only
return;
@ -4524,7 +4530,7 @@ void RB_SSAO()
}
// FIXME very expensive to enable this in subviews
if( backEnd.viewDef->isSubview )
if( viewDef->isSubview )
{
return;
}
@ -4678,7 +4684,7 @@ void RB_SSAO()
{
globalFramebuffers.ambientOcclusionFBO[0]->Bind();
glClearColor( 1, 0, 0, 1 );
glClearColor( 0, 0, 0, 0 );
glClear( GL_COLOR_BUFFER_BIT );
renderProgManager.BindShader_AmbientOcclusion();
@ -4814,6 +4820,10 @@ void RB_SSAO()
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
}
renderProgManager.Unbind();
GL_State( GLS_DEFAULT );
GL_Cull( CT_FRONT_SIDED );
GL_CheckErrors();
}
@ -4958,7 +4968,7 @@ void RB_DrawViewInternal( const viewDef_t* viewDef, const int stereoEye )
globalImages->currentDepthImage->CopyDepthbuffer( viewport.x1, viewport.y1, viewport.GetWidth(), viewport.GetHeight() );
}
RB_SSAO();
RB_SSAO( viewDef );
//-------------------------------------------------
// now draw any non-light dependent shading passes