experiment: use batching for sprites

renderbatches just needs to be moved, sprite drawers already used preparepolygon
this seems to improve performance accross the board, no matter how many sprites there are, but the benefits becomes greater the more sprites there are
in some cases gaining up to 200fps! (precip especially benefits from this)
needs some testing to see if this may cause issues with sorting, etc
This commit is contained in:
Alug committed 2025-09-26 21:46:46 +02:00
1 parent bdb775c95a
commit 90e87cabb7
1 file changed
+3 -3
+3 -3
View File
@@ -5586,9 +5586,6 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, player_t *player, int stencil_
PS_STOP_TIMING(ps_bsptime);
if (LIKELY(cv_glbatching.value))
HWR_RenderBatches();
if constexpr (Type == RenderViewpointType::kPortal)
{
if (skyWallVertexArraySize) // if there are skywalls to draw using the alternate method
@@ -5617,6 +5614,9 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, player_t *player, int stencil_
HWR_DrawSprites<DrawSpritesType::kSprites>();
PS_STOP_TIMING(ps_hw_spritedrawtime);
if (LIKELY(cv_glbatching.value))
HWR_RenderBatches();
ps_numdrawnodes.value.i = 0;
ps_hw_nodesorttime.value.p = 0;
ps_hw_nodedrawtime.value.p = 0;