mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Removed obsolete cvar r_useHDR
This commit is contained in:
parent
c8e32876a0
commit
0ac23b5f94
6 changed files with 6 additions and 109 deletions
|
@ -185,7 +185,7 @@ void GBufferFillPass::RenderView( nvrhi::ICommandList* commandList, const drawSu
|
|||
if( !r_usePBR.GetBool() )
|
||||
{
|
||||
ambientBoost += r_useSSAO.GetBool() ? 0.2f : 0.0f;
|
||||
ambientBoost *= r_useHDR.GetBool() ? 1.1f : 1.0f;
|
||||
ambientBoost *= 1.1f;
|
||||
}
|
||||
|
||||
ambientColor.x = r_forceAmbient.GetFloat() * ambientBoost;
|
||||
|
|
|
@ -2221,7 +2221,7 @@ void idRenderBackend::AmbientPass( const drawSurf_t* const* drawSurfs, int numDr
|
|||
if( !r_usePBR.GetBool() )
|
||||
{
|
||||
ambientBoost += r_useSSAO.GetBool() ? 0.2f : 0.0f;
|
||||
ambientBoost *= r_useHDR.GetBool() ? 1.1f : 1.0f;
|
||||
ambientBoost *= 1.1f;
|
||||
}
|
||||
|
||||
ambientColor.x = r_forceAmbient.GetFloat() * ambientBoost;
|
||||
|
@ -5771,7 +5771,7 @@ void idRenderBackend::Tonemap( const viewDef_t* _viewDef )
|
|||
|
||||
void idRenderBackend::Bloom( const viewDef_t* _viewDef )
|
||||
{
|
||||
if( _viewDef->is2Dgui || !r_useHDR.GetBool() || ( _viewDef->renderView.rdflags & RDF_IRRADIANCE ) )
|
||||
if( _viewDef->is2Dgui || ( _viewDef->renderView.rdflags & RDF_IRRADIANCE ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -5807,31 +5807,9 @@ void idRenderBackend::Bloom( const viewDef_t* _viewDef )
|
|||
|
||||
GL_SelectTexture( 0 );
|
||||
|
||||
if( r_useHDR.GetBool() )
|
||||
{
|
||||
globalImages->currentRenderHDRImage->Bind();
|
||||
globalImages->currentRenderHDRImage->Bind();
|
||||
|
||||
renderProgManager.BindShader_Brightpass();
|
||||
}
|
||||
else
|
||||
{
|
||||
int x = viewDef->viewport.x1;
|
||||
int y = viewDef->viewport.y1;
|
||||
int w = viewDef->viewport.x2 - viewDef->viewport.x1 + 1;
|
||||
int h = viewDef->viewport.y2 - viewDef->viewport.y1 + 1;
|
||||
|
||||
//RENDERLOG_PRINTF( "Resolve to %i x %i buffer\n", w, h );
|
||||
|
||||
// resolve the screen
|
||||
globalImages->currentRenderImage->CopyFramebuffer( x, y, w, h );
|
||||
commonPasses.BlitTexture(
|
||||
commandList,
|
||||
globalFramebuffers.bloomRenderFBO[0]->GetApiObject(),
|
||||
globalImages->ldrImage->GetTextureHandle(),
|
||||
&bindingCache );
|
||||
|
||||
renderProgManager.BindShader_Brightpass();
|
||||
}
|
||||
renderProgManager.BindShader_Brightpass();
|
||||
|
||||
float screenCorrectionParm[4];
|
||||
screenCorrectionParm[0] = hdrKey;
|
||||
|
@ -5841,7 +5819,6 @@ void idRenderBackend::Bloom( const viewDef_t* _viewDef )
|
|||
SetFragmentParm( RENDERPARM_SCREENCORRECTIONFACTOR, screenCorrectionParm ); // rpScreenCorrectionFactor
|
||||
|
||||
float overbright[4];
|
||||
if( r_useHDR.GetBool() )
|
||||
{
|
||||
if( r_hdrAutoExposure.GetBool() )
|
||||
{
|
||||
|
@ -5855,13 +5832,6 @@ void idRenderBackend::Bloom( const viewDef_t* _viewDef )
|
|||
overbright[2] = 0;
|
||||
overbright[3] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
overbright[0] = r_ldrContrastThreshold.GetFloat();
|
||||
overbright[1] = r_ldrContrastOffset.GetFloat();
|
||||
overbright[2] = 0;
|
||||
overbright[3] = 0;
|
||||
}
|
||||
SetFragmentParm( RENDERPARM_OVERBRIGHT, overbright ); // rpOverbright
|
||||
|
||||
// Draw
|
||||
|
@ -6669,7 +6639,6 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
}
|
||||
}
|
||||
|
||||
#if defined( USE_NVRHI )
|
||||
// SP: reset the graphics state for validation layers
|
||||
currentVertexBuffer = nullptr;
|
||||
currentIndexBuffer = nullptr;
|
||||
|
@ -6677,7 +6646,6 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
currentVertexOffset = 0;
|
||||
currentIndexOffset = 0;
|
||||
currentJointOffset = 0;
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------
|
||||
// RB_BeginDrawingView
|
||||
|
@ -6692,7 +6660,7 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
// ensures that depth writes are enabled for the depth clear
|
||||
GL_State( GLS_DEFAULT | GLS_CULL_FRONTSIDED, true );
|
||||
|
||||
bool useHDR = r_useHDR.GetBool() && !_viewDef->is2Dgui;
|
||||
bool useHDR = !_viewDef->is2Dgui;
|
||||
bool clearColor = false;
|
||||
|
||||
if( _viewDef->renderView.rdflags & RDF_IRRADIANCE )
|
||||
|
@ -6710,11 +6678,7 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined( USE_NVRHI )
|
||||
globalFramebuffers.ldrFBO->Bind();
|
||||
#else
|
||||
Framebuffer::Unbind();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Clear the depth buffer and clear the stencil to 128 for stencil shadows as well as gui masking
|
||||
|
@ -6722,13 +6686,6 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
|
||||
// RB end
|
||||
|
||||
//GL_CheckErrors();
|
||||
|
||||
#if !defined( USE_VULKAN ) && !defined( USE_NVRHI )
|
||||
// bind one global Vertex Array Object (VAO)
|
||||
glBindVertexArray( glConfig.global_vao );
|
||||
#endif
|
||||
|
||||
//------------------------------------
|
||||
// sets variables that can be used by all programs
|
||||
//------------------------------------
|
||||
|
@ -6777,13 +6734,11 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
//-------------------------------------------------
|
||||
// build hierarchical depth buffer and SSAO render target
|
||||
//-------------------------------------------------
|
||||
#if defined( USE_NVRHI )
|
||||
if( r_useNewSsaoPass.GetBool() )
|
||||
{
|
||||
DrawScreenSpaceAmbientOcclusion2( _viewDef );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
DrawScreenSpaceAmbientOcclusion( _viewDef );
|
||||
}
|
||||
|
@ -6803,21 +6758,6 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
//-------------------------------------------------
|
||||
DrawInteractions( _viewDef );
|
||||
|
||||
//-------------------------------------------------
|
||||
// capture the depth for the motion blur before rendering any post process surfaces that may contribute to the depth
|
||||
//-------------------------------------------------
|
||||
if( ( r_motionBlur.GetInteger() > 0 || r_useSSAO.GetBool() || r_useSSGI.GetBool() ) && !r_useHDR.GetBool() )
|
||||
{
|
||||
const idScreenRect& viewport = viewDef->viewport;
|
||||
globalImages->currentDepthImage->CopyDepthbuffer( viewport.x1, viewport.y1, viewport.GetWidth(), viewport.GetHeight() );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// darken the scene using the screen space ambient occlusion
|
||||
//-------------------------------------------------
|
||||
//DrawScreenSpaceAmbientOcclusion( _viewDef );
|
||||
//RB_SSGI( _viewDef );
|
||||
|
||||
//-------------------------------------------------
|
||||
// now draw any non-light dependent shading passes
|
||||
//-------------------------------------------------
|
||||
|
@ -6865,10 +6805,6 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
// resolve the screen
|
||||
#if defined( USE_NVRHI )
|
||||
|
||||
|
||||
|
||||
//if( currentFrameBuffer->GetApiObject()->getDesc().colorAttachments.begin().)
|
||||
|
||||
if( R_GetMSAASamples() > 1 )
|
||||
{
|
||||
renderLog.OpenBlock( "Resolve to _currentRender" );
|
||||
|
@ -6941,30 +6877,8 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
// tonemapping: convert back from HDR to LDR range
|
||||
//-------------------------------------------------
|
||||
|
||||
#if !defined( USE_VULKAN )
|
||||
|
||||
// SRS - For OSX OpenGL record the final portion of GPU time while no other elapsed time query is active (after final passes and before bloom & other post processing)
|
||||
#if defined(__APPLE__) && !defined( USE_NVRHI )
|
||||
renderLog.OpenMainBlock( MRB_GPU_TIME );
|
||||
#endif
|
||||
|
||||
if( useHDR && !( _viewDef->renderView.rdflags & RDF_IRRADIANCE ) && !_viewDef->targetRender )
|
||||
{
|
||||
#if !defined( USE_NVRHI )
|
||||
{
|
||||
glBindFramebuffer( GL_READ_FRAMEBUFFER_EXT, globalFramebuffers.hdrFBO->GetFramebuffer() );
|
||||
glBindFramebuffer( GL_DRAW_FRAMEBUFFER_EXT, globalFramebuffers.hdr64FBO->GetFramebuffer() );
|
||||
glBlitFramebuffer( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(),
|
||||
0, 0, 64, 64,
|
||||
GL_COLOR_BUFFER_BIT,
|
||||
GL_LINEAR );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
CalculateAutomaticExposure();
|
||||
Tonemap( _viewDef );
|
||||
#else
|
||||
ToneMappingParameters parms;
|
||||
if( R_UseTemporalAA() )
|
||||
{
|
||||
|
@ -6983,14 +6897,8 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
toneMapPass->SimpleRender( commandList, parms, viewDef, globalImages->currentRenderHDRImage->GetTextureHandle(), globalFramebuffers.ldrFBO->GetApiObject() );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// SRS - This macOS OpenGL-specific CloseMainBlock() must occur before the next OpenMainBlock() is called
|
||||
#if defined(__APPLE__) && !defined( USE_NVRHI )
|
||||
renderLog.CloseMainBlock();
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------
|
||||
// bloom post processing
|
||||
//-------------------------------------------------
|
||||
|
@ -7029,8 +6937,6 @@ void idRenderBackend::DrawViewInternal( const viewDef_t* _viewDef, const int ste
|
|||
blitParms.targetViewport = nvrhi::Viewport( renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
commonPasses.BlitTexture( commandList, blitParms, &bindingCache );
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
renderLog.CloseBlock();
|
||||
|
|
|
@ -1155,7 +1155,6 @@ extern idCVar r_useShadowDepthBounds; // use depth bounds test on individual sh
|
|||
extern idCVar r_useShadowMapping; // use shadow mapping instead of stencil shadows
|
||||
extern idCVar r_useShadowAtlas; // temporary for perf testing: pack shadow maps into big atlas
|
||||
extern idCVar r_useHalfLambertLighting; // use Half-Lambert lighting instead of classic Lambert
|
||||
extern idCVar r_useHDR;
|
||||
// RB end
|
||||
|
||||
extern idCVar r_skipStaticInteractions; // skip interactions created at level load
|
||||
|
|
|
@ -640,7 +640,6 @@ void idRenderProgManager::Init( nvrhi::IDevice* device )
|
|||
#endif
|
||||
|
||||
r_useHalfLambertLighting.ClearModified();
|
||||
r_useHDR.ClearModified();
|
||||
r_usePBR.ClearModified();
|
||||
r_pbrDebug.ClearModified();
|
||||
|
||||
|
|
|
@ -507,7 +507,6 @@ idStr idRenderProgManager::StripDeadCode( const idStr& in, const char* name, con
|
|||
src.AddDefine( "USE_HALF_LAMBERT" );
|
||||
}
|
||||
|
||||
if( r_useHDR.GetBool() )
|
||||
{
|
||||
src.AddDefine( "USE_LINEAR_RGB" );
|
||||
}
|
||||
|
|
|
@ -289,12 +289,6 @@ idCVar r_shadowMapRegularDepthBiasScale( "r_shadowMapRegularDepthBiasScale", "0.
|
|||
idCVar r_shadowMapSunDepthBiasScale( "r_shadowMapSunDepthBiasScale", "0.999991", CVAR_RENDERER | CVAR_FLOAT, "shadowmap bias to fight shadow acne for cascaded shadow mapping with parallel lights" );
|
||||
|
||||
// RB: HDR parameters
|
||||
#if defined( USE_VULKAN )
|
||||
idCVar r_useHDR( "r_useHDR", "0", CVAR_RENDERER | CVAR_ROM | CVAR_STATIC | CVAR_BOOL, "Can't be changed, is broken on Vulkan backend" );
|
||||
#else
|
||||
idCVar r_useHDR( "r_useHDR", "1", CVAR_RENDERER | CVAR_ROM | CVAR_STATIC | CVAR_BOOL, "Can't be changed: Use high dynamic range rendering" );
|
||||
#endif
|
||||
|
||||
idCVar r_hdrAutoExposure( "r_hdrAutoExposure", "0", CVAR_RENDERER | CVAR_BOOL, "EXPENSIVE: enables adapative HDR tone mapping otherwise the exposure is derived by r_exposure" );
|
||||
idCVar r_hdrAdaptionRate( "r_hdrAdaptionRate", "1", CVAR_RENDERER | CVAR_FLOAT, "The rate of adapting the hdr exposure value`. Defaulted to a second." );
|
||||
idCVar r_hdrMinLuminance( "r_hdrMinLuminance", "0.02", CVAR_RENDERER | CVAR_FLOAT, "" );
|
||||
|
|
Loading…
Reference in a new issue