[Closed] Trim Sprite Borders Option

Moderator: GZDoom Developers

Trim Sprite Borders Option

Postby Major Cooke » Tue Dec 07, 2021 2:44 pm

Pull Request

Adds an option to Display Options. When changed, it'll reload sprites with one difference: borders trimmed off or not. By default, this is now off.

$DSPLYMNU_TRIMSPRITEBORDERS needs a translation for "Trim Sprite Borders" text but I'm not sure how to handle that.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Trim Sprite Borders Option

Postby Graf Zahl » Tue Dec 07, 2021 2:50 pm

Before merging this I'd like to see some performance comparisons. The mod that prompted me to add the feature was LilWhiteMouse's The Chosen which has lots of sprites with extremely large empty borders. So if someone with somewhat less powerful hardware could make some checks would make any decision a lot easier.

On the Geforce 8600 I owned back in the day this made the difference betweem keeping a stable 60 fps frame rate and frequently dropping down to 30 fps.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Trim Sprite Borders Option

Postby Major Cooke » Tue Dec 07, 2021 3:18 pm

My laptop is a GeForce GTX 960M (laptop). A little over half a decade old.

But I have a stress test package! Just load it up on a map. 20 images of the weapon are made as overlays.

With my card, FPS:

~80 without trimming
200+ with trimming

Keeping in mind this one image is 1920 x 1057.
You do not have the required permissions to view the files attached to this post.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Trim Sprite Borders Option

Postby Marisa Kirisame » Tue Dec 07, 2021 3:21 pm

We could also see how big of a difference it makes in mods like Project Brutality, where the vast majority of weapon sprites are fullscreen, and there's tens of thousands of them.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Trim Sprite Borders Option

Postby Graf Zahl » Tue Dec 07, 2021 3:22 pm

Yeah, that might also be interesting, although that's far more a memory concern than anything else. Fullscreen weapon sprite can quickly eat available video memory.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Trim Sprite Borders Option

Postby Major Cooke » Tue Dec 07, 2021 3:52 pm

The sprites in my test package above might fall into that category in that case... Should I downsize them for this test?

Tossed this into QZDoom so the next build will make this feature more easily accessible.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Trim Sprite Borders Option

Postby Graf Zahl » Tue Dec 07, 2021 5:06 pm

Of course not. I'd like to see how much performance this may cost.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Trim Sprite Borders Option

Postby Major Cooke » Tue Dec 07, 2021 5:55 pm

Okay. Specifically on MAP30 is when I tested this, at the beginning area. 20 of those super high res sprites dropped the performance from 200+ fps to 80, but this laptop is pretty old (purchased in 2016).

The PNG of the sprite used is compressed down too.

For the project I'll be using it in, I'll be cropping it down to not have as much excessive size - mainly just large enough for all the pieces to be fit into frame so they can retain their positions without needing to position everything manually... and painfully.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Trim Sprite Borders Option

Postby Major Cooke » Tue Dec 14, 2021 7:52 am

Closing this because this is replacing it.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest