Render precip through blockmap instead of BSP
I don't think I can explain this well so here's the note from the original commit
There can be very many precipmobjs in a sector. During BSP rendering, for each sector reached by BSP (the entire visible level at least), all the precipmobjs would be iterated and their distance from the camera calculated, to determine whether they are within draw distance. The issue with the old approach is that there really are too many precipmobjs in each sector. By iterating the blockmap within a certain range instead, precipmobjs out of view are not iterated at all, saving some time.
I haven't tested how much this improves performance yet and also some changes to blockmap code in 2.2.14 made this slightly harder to port
Merge request reports
Activity
added 14 commits
-
ab450912...d3241425 - 12 commits from branch
Hanicef:next
- 680f9571 - Merge branch 'next' into precipoptimizations
- a71132fc - Don't add precip sprites if no precipitation
-
ab450912...d3241425 - 12 commits from branch
This isn't making any noticeable difference, even with !13 (merged) turned up to max.
Without:
With:
If you look at the stats, you can see that
R_DrawPlanes
is the heaviest followed byPortals+Skybox
, and both are not relevant to drawing sprites, let alone precipitation. It was a nice try, but I don't think this is worth merging.