diff --git a/src/graphics/render_geometry.cpp b/src/graphics/render_geometry.cpp index b56e5b9e2..c783d6c7b 100644 --- a/src/graphics/render_geometry.cpp +++ b/src/graphics/render_geometry.cpp @@ -1029,16 +1029,20 @@ void IrrDriver::renderShadows() glDisable(GL_POLYGON_OFFSET_FILL); - if (irr_driver->hasARBTextureView()) { - for (unsigned i = 0; i < 2; i++) + ScopedGPUTimer Timer(getGPUTimer(Q_SHADOW_POSTPROCESS)); + + if (irr_driver->hasARBTextureView()) { - m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO(), i, - 2.f * m_shadow_scales[0].first / m_shadow_scales[i].first, - 2.f * m_shadow_scales[0].second / m_shadow_scales[i].second); + for (unsigned i = 0; i < 2; i++) + { + m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO(), i, + 2.f * m_shadow_scales[0].first / m_shadow_scales[i].first, + 2.f * m_shadow_scales[0].second / m_shadow_scales[i].second); + } } + glBindTexture(GL_TEXTURE_2D_ARRAY, m_rtts->getShadowFBO().getRTT()[0]); } - glBindTexture(GL_TEXTURE_2D_ARRAY, m_rtts->getShadowFBO().getRTT()[0]); glGenerateMipmap(GL_TEXTURE_2D_ARRAY); } diff --git a/src/utils/profiler.cpp b/src/utils/profiler.cpp index 4578d97ea..30bfffe23 100644 --- a/src/utils/profiler.cpp +++ b/src/utils/profiler.cpp @@ -35,6 +35,7 @@ static const char* GPU_Phase[Q_LAST] = "Shadows Cascade 1", "Shadows Cascade 2", "Shadows Cascade 3", + "Shadows Postprocess", "Solid Pass 1", "RSM", "RH", diff --git a/src/utils/profiler.hpp b/src/utils/profiler.hpp index 66fd07489..5e4bb4139 100644 --- a/src/utils/profiler.hpp +++ b/src/utils/profiler.hpp @@ -34,6 +34,7 @@ enum QueryPerf Q_SHADOWS_CASCADE1, Q_SHADOWS_CASCADE2, Q_SHADOWS_CASCADE3, + Q_SHADOW_POSTPROCESS, Q_SOLID_PASS1, Q_RSM, Q_RH,