Rendering Hires PSprites: In pieces vs. whole?

Mon Jul 12, 2021 11:55 am

I've been debating whether it's more efficient to render weapons as either with fewer overlays, or in more pieces?

Assuming all images are the same size, what I've discovered so far, when using high resolution images.

Whole:
  • Fewer PSprites active, less maintenance, possible VRAM usage
  • Less chance to override a PSprite accidentally
  • Slower loading without precaching (especially if larger/high resolution)
  • Potentially larger file size and wasted space

In Pieces:
  • Less precaching
  • Fewer files, smaller package, potentially more optimized
  • More maintenance, PSprites and possible VRAM usage
  • Chance to override existing PSprites when combining with other mods

The images in particular are pretty large too. At least 512 px or larger in dimensions, and in high resolutions. Which would be more efficient in general?

I ask because what I'm trying to do is optimize my mod so it runs faster in general. It feels like it's coming down to slow-downs immediately versus slow-downs later. In pieces definitely may compound issues with crazier scenarios like slaughtermaps, since more overlays means more code executed.

Re: Rendering Hires PSprites: In pieces vs. whole?

Mon Jul 12, 2021 12:16 pm

Is that (psprite) really a stumbling stone that noticeably drops performance? Because you have a high chance to spend your time on something that will add/delete 0.01 percent to/of overall performance. Yaaaaaay....??????

I mean, you should optimize thing, that actually reduce performance.

Re: Rendering Hires PSprites: In pieces vs. whole?

Mon Jul 12, 2021 8:32 pm

It comes down to two ways performance can be affected more and choosing whichever path has the least impact on it.