Page 1 of 1

Custom weapon sprite cutoff

Posted: Tue Apr 19, 2022 3:27 pm
by KVELLER
I have a custom DECORATE weapon with a firing animation comprised of high resolution sprites (scaled down with a TEXTURES lump), and the last frame gets cutoff at the top:
Screenshot_Doom_20220419_165805.jpg
Here's the sprite:
REBFD0.png
This is on GZDoom 4.7.1. Is there a limit to how big sprites can be on the screen or something like that?

This is its TEXTURES definition, if it helps at all:

Code: Select all

sprite REBFD0, 960, 454
{
	XScale 2.2
	YScale 2.2
	Patch REBFD0, -130, -80
}

Re: Custom weapon sprite cutoff

Posted: Tue Apr 19, 2022 4:08 pm
by Enjay
It's the alignment of the patch inside your texture. You have shifted it vertically by 80 pixels - so 80 pixels are outside the "frame" of the texture.

Here is your sprite with the top 80 pixels cut off. It is cut off in the same place as the one in your screenshot.



(Perhaps counter-intuitively, a -ve offset of a patch inside a texture moves it up and a +ve one moves it down.)

Re: Custom weapon sprite cutoff

Posted: Tue Apr 19, 2022 4:28 pm
by KVELLER
Enjay wrote:It's the alignment of the patch inside your texture. You have shifted it vertically by 80 pixels - so 80 pixels are outside the "frame" of the texture.
Ohh, I get it now! Silly me was using the patch origins as offsets instead of... y'know... the damn offset property.

Thanks a bunch!