Add gl_shownormals cvar as enabling ssao and setting a specific debug level was a bit too obscure for this feature

This commit is contained in:
Magnus Norddahl 2024-03-18 03:26:29 +01:00
commit 7e2d1da4a6
4 changed files with 7 additions and 5 deletions

View file

@ -145,7 +145,7 @@ sector_t* RenderViewpoint(FRenderViewpoint& mainvp, AActor* camera, IntRect* bou
if (mainview) // Bind the scene frame buffer and turn on draw buffers used by ssao
{
bool useSSAO = (gl_ssao != 0);
bool useSSAO = (gl_ssao != 0 || gl_shownormals);
screen->SetSceneRenderTarget(useSSAO);
RenderState.SetPassType(useSSAO ? GBUFFER_PASS : NORMAL_PASS);
RenderState.EnableDrawBuffers(RenderState.GetPassDrawBufferCount(), true);