Skip to content

Commit

Permalink
Small item HUD UI render refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Feb 10, 2018
1 parent 76ff57a commit b3c4ad8
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions src/Layers/xrRender/r__dsgraph_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,29 +404,16 @@ void D3DXRenderBase::r_dsgraph_render_hud_ui()
const ref_rt rt_null;
RCache.set_RT(0, 1);
RCache.set_RT(0, 2);
auto zb = HW.pBaseZB;

#if (RENDER == R_R3) || (RENDER == R_R4) || (RENDER==R_GL)
if (!RImplementation.o.dx10_msaa)
{
if (RImplementation.o.albedo_wo)
RImplementation.Target->u_setrt(RImplementation.Target->rt_Accumulator, rt_null, rt_null, HW.pBaseZB);
else
RImplementation.Target->u_setrt(RImplementation.Target->rt_Color, rt_null, rt_null, HW.pBaseZB);
}
else
{
if (RImplementation.o.albedo_wo)
RImplementation.Target->u_setrt(
RImplementation.Target->rt_Accumulator, rt_null, rt_null, RImplementation.Target->rt_MSAADepth->pZRT);
else
RImplementation.Target->u_setrt(
RImplementation.Target->rt_Color, rt_null, rt_null, RImplementation.Target->rt_MSAADepth->pZRT);
}
#else // (RENDER==R_R3) || (RENDER==R_R4)
if (RImplementation.o.albedo_wo)
RImplementation.Target->u_setrt(RImplementation.Target->rt_Accumulator, rt_null, rt_null, HW.pBaseZB);
else
RImplementation.Target->u_setrt(RImplementation.Target->rt_Color, rt_null, rt_null, HW.pBaseZB);
#endif // (RENDER==R_R3) || (RENDER==R_R4)
if (RImplementation.o.dx10_msaa)
zb = RImplementation.Target->rt_MSAADepth->pZRT;
#endif

RImplementation.Target->u_setrt(
RImplementation.o.albedo_wo ? RImplementation.Target->rt_Accumulator : RImplementation.Target->rt_Color,
rt_null, rt_null, zb);
#endif // RENDER!=R_R1

rmNear();
Expand Down

0 comments on commit b3c4ad8

Please sign in to comment.