Skip to content

Commit e90204d

Browse files
committed
xrRender_R1: Added MT details and HOM processing from R2
+5 FPS when enabled
1 parent 23d25a2 commit e90204d

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/Layers/xrRenderPC_R1/FStaticRender.cpp

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ void CRender::reset_end()
147147
void CRender::OnFrame()
148148
{
149149
Models->DeleteQueue();
150+
151+
if (ps_r2_ls_flags.test(R2FLAG_EXP_MT_CALC))
152+
{
153+
// MT-details (@front)
154+
Device.seqParallel.insert(
155+
Device.seqParallel.begin(), fastdelegate::FastDelegate0<>(Details, &CDetailManager::MT_CALC));
156+
157+
// MT-HOM (@front)
158+
Device.seqParallel.insert(Device.seqParallel.begin(), fastdelegate::FastDelegate0<>(&HOM, &CHOM::MT_RENDER));
159+
}
150160
}
151161

152162
// Перед началом рендера мира --#SM+#-- +SecondVP+
@@ -426,8 +436,11 @@ void CRender::Calculate()
426436
// Frustum & HOM rendering
427437
ViewBase.CreateFromMatrix(Device.mFullTransform, FRUSTUM_P_LRTB | FRUSTUM_P_FAR);
428438
View = nullptr;
429-
HOM.Enable();
430-
HOM.Render(ViewBase);
439+
if (!ps_r2_ls_flags.test(R2FLAG_EXP_MT_CALC))
440+
{
441+
HOM.Enable();
442+
HOM.Render(ViewBase);
443+
}
431444
gm_SetNearer(FALSE);
432445
phase = PHASE_NORMAL;
433446

@@ -597,7 +610,7 @@ void CRender::Calculate()
597610
}
598611
}
599612

600-
// Calculate miscelaneous stuff
613+
// Calculate miscellaneous stuff
601614
BasicStats.ShadowsCalc.Begin();
602615
L_Shadows->calculate();
603616
BasicStats.ShadowsCalc.End();
@@ -661,7 +674,7 @@ void CRender::Render()
661674
BasicStats.ShadowsRender.End();
662675
r_dsgraph_render_lods(false, true); // lods - FB
663676
r_dsgraph_render_graph(1); // normal level, secondary priority
664-
L_Dynamic->render(1); // addititional light sources, secondary priority
677+
L_Dynamic->render(1); // additional light sources, secondary priority
665678
PortalTraverser.fade_render(); // faded-portals
666679
r_dsgraph_render_sorted(); // strict-sorted geoms
667680
BasicStats.Glows.Begin();

0 commit comments

Comments
 (0)