From 6f136d403b6bbccae80661c6585f29e1caed3a7c Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 1 Feb 2023 17:09:34 -0600 Subject: SL-19000 Fix various 3D UI components not respecting depth buffer. Incidental decruft. Do I get a prize for 1000th jira? --- indra/newview/llviewerdisplay.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'indra/newview/llviewerdisplay.cpp') diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 28d6267029..2a2d390765 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1312,23 +1312,17 @@ void render_ui(F32 zoom_factor, int subfield) gGL.popMatrix(); } + // Render our post process prior to the HUD, UI, etc. + gPipeline.renderPostProcess(); + + // apply gamma correction and post effects + gPipeline.renderFinalize(); + { LLGLState::checkStates(); - // Render our post process prior to the HUD, UI, etc. - gPipeline.renderPostProcess(); - LLGLState::checkStates(); - // draw hud and 3D ui elements into screen render target so they'll be able to use - // the depth buffer (avoids extra copy of depth buffer per frame) - gPipeline.screenTarget()->bindTarget(); - // SL-15709 - // NOTE: Tracy only allows one ZoneScoped per function. - // Solutions are: - // 1. Use a new scope - // 2. Use named zones - // 3. Use transient zones - LL_PROFILE_ZONE_NAMED_CATEGORY_UI("HUD"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD); + LL_PROFILE_ZONE_NAMED_CATEGORY_UI("HUD"); render_hud_elements(); LLGLState::checkStates(); render_hud_attachments(); @@ -1357,11 +1351,6 @@ void render_ui(F32 zoom_factor, int subfield) } } - gPipeline.screenTarget()->flush(); - - // apply gamma correction and post effects before rendering 2D UI - gPipeline.renderFinalize(); - if (render_ui) { LL_PROFILE_ZONE_NAMED_CATEGORY_UI("UI 2D"); //LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_2D); -- cgit v1.2.3