mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Bugfix
This commit is contained in:
parent
e8826caae8
commit
b0f5f51f4c
2 changed files with 20 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue