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.
Trim Sprite Borders Option
Moderator: GZDoom Developers
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
-
- Lead GZDoom+Raze Developer
- Posts: 49179
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Trim Sprite Borders Option
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.
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.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Trim Sprite Borders Option
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.
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.
-
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
Re: Trim Sprite Borders Option
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.
-
- Lead GZDoom+Raze Developer
- Posts: 49179
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Trim Sprite Borders Option
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.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Trim Sprite Borders Option
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.
Tossed this into QZDoom so the next build will make this feature more easily accessible.
-
- Lead GZDoom+Raze Developer
- Posts: 49179
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Trim Sprite Borders Option
Of course not. I'd like to see how much performance this may cost.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Trim Sprite Borders Option
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.
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.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Trim Sprite Borders Option
Closing this because this is replacing it.