Rendering Hires PSprites: In pieces vs. whole?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Rendering Hires PSprites: In pieces vs. whole?

Postby Major Cooke » 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.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

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

Postby Apeirogon » 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.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

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

Postby Major Cooke » 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.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests