Pixels of the weapon sprite being distorted during movement
Moderator: GZDoom Developers
Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.
If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.
Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.
If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.
Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
-
- Posts: 240
- Joined: Tue Oct 18, 2011 8:57 am
Pixels of the weapon sprite being distorted during movement
in GZDoom with texture filtering turned off, whenever a weapon sprite moves on screen its pixels become inconsistent in size, and instead constantly resize and realign, as if sprite image is being resampled differently every frame. This results in "wobbliness", "distortion waves" and other nasty effects. They are generally miniscule, but are far more noticable on larger sprites, however when you do notice it, you can not "unnotice it" again, kinda like "you are now aware you are breathing" thing (sorry by the way).
It is most noticeable in high resolutions (like 1600x900), but same effect happens at lower resolutions as well. Also much less pronounced in software, the slight "distortion wave" can still be seen.
I'm not sure how to explain it better, so here's some comparison videos. Videos have been taken from 1600x900 footage, cropped to the gun (BFG in this case) then doubled in resolution with integer scaling to make the matter more clearly visible.
This is how it looks in glBoom+ (no distortions): https://my.mixtape.moe/yljwuu.webm
This is GZDoom software mode (distortions most visible in the horizontal lines): https://my.mixtape.moe/bgirpo.webm
This is GZDoom OpenGL mode (distortions allover the place) https://my.mixtape.moe/spgehb.webm
This happens at any resolution.
It is most noticeable in high resolutions (like 1600x900), but same effect happens at lower resolutions as well. Also much less pronounced in software, the slight "distortion wave" can still be seen.
I'm not sure how to explain it better, so here's some comparison videos. Videos have been taken from 1600x900 footage, cropped to the gun (BFG in this case) then doubled in resolution with integer scaling to make the matter more clearly visible.
This is how it looks in glBoom+ (no distortions): https://my.mixtape.moe/yljwuu.webm
This is GZDoom software mode (distortions most visible in the horizontal lines): https://my.mixtape.moe/bgirpo.webm
This is GZDoom OpenGL mode (distortions allover the place) https://my.mixtape.moe/spgehb.webm
This happens at any resolution.
-
-
- Posts: 3797
- Joined: Sun Aug 07, 2011 4:32 am
Re: Pixels of the weapon sprite being distorted during movem
Links to videos are broken, got '404 Fire not found!' on all of them.
-
- Moderator Team Lead
- Posts: 21619
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
Re: Pixels of the weapon sprite being distorted during movem
The links seem to work fine for me.
-
- Posts: 2038
- Joined: Thu May 02, 2013 1:27 am
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Pixels of the weapon sprite being distorted during movem
Not a bug as far as I know. This is an unfortunate artifact of non-integer nearest-neighbour scaling and movement.
-
-
- Posts: 26444
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Pixels of the weapon sprite being distorted during movem
It could be because the website security certificate is expired. Firefox blocks it with a message saying as much._mental_ wrote:Links to videos are broken, got '404 Fire not found!' on all of them.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Pixels of the weapon sprite being distorted during movem
Bumping this up since I wanted to post about this as well, but I remembered this topic exists already.phantombeta wrote:Not a bug as far as I know. This is an unfortunate artifact of non-integer nearest-neighbour scaling and movement.
I've recently noticed the same issue (playing in 1080p, though I don't think it actually matters), and indeed, it is one of those things that you can't unsee once you've noticed them. I'm no programmer, so in this case, could you explain why this would be the case? GZDoom is virtually the only port I'm using that exhibits this behavior - Choco, Crispy, PrBoom, Eternity, none of them appear to suffer from this.
-
- Posts: 2038
- Joined: Thu May 02, 2013 1:27 am
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Pixels of the weapon sprite being distorted during movem
As far as I know, those are all software-rendered ports. Vanilla Doom's software renderer can't really exhibit this behaviour as far as I know. GZDoom draws screen elements (the statusbar, weapon, menus, etc.) with the selected backend, and it does nearest neighbour resizing at non-integer scales instead of trying to force it to integer scales.lowskill. wrote:I've recently noticed the same issue (playing in 1080p, though I don't think it actually matters), and indeed, it is one of those things that you can't unsee once you've noticed them. I'm no programmer, so in this case, could you explain why this would be the case? GZDoom is virtually the only port I'm using that exhibits this behavior - Choco, Crispy, PrBoom, Eternity, none of them appear to suffer from this.
GZDoom also has interpolation for the weapon bobbing (and weapon/PSprite offsets) with non-integer coordinates, which also causes this issue.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Pixels of the weapon sprite being distorted during movem
PrBoom isn't, it also has a GL 2.1 renderer, and the issue isn't present there either.phantombeta wrote:As far as I know, those are all software-rendered ports. Vanilla Doom's software renderer can't really exhibit this behaviour as far as I know. GZDoom draws screen elements (the statusbar, weapon, menus, etc.) with the selected backend, and it does nearest neighbour resizing at non-integer scales instead of trying to force it to integer scales.lowskill. wrote:I've recently noticed the same issue (playing in 1080p, though I don't think it actually matters), and indeed, it is one of those things that you can't unsee once you've noticed them. I'm no programmer, so in this case, could you explain why this would be the case? GZDoom is virtually the only port I'm using that exhibits this behavior - Choco, Crispy, PrBoom, Eternity, none of them appear to suffer from this.
GZDoom also has interpolation for the weapon bobbing (and weapon/PSprite offsets) with non-integer coordinates, which also causes this issue.
It looks like GZDoom is kind of the odd one here with this unique anomaly.
-
- Spotlight Team
- Posts: 999
- Joined: Mon Nov 25, 2019 8:54 am
- Graphics Processor: Intel (Modern GZDoom)
Re: Pixels of the weapon sprite being distorted during movem
''Stop right there, criminal scum! You have violated the law.''lowskill. wrote: PrBoom isn't, it also has a GL 2.1 renderer, and the issue isn't present there either.
It looks like GZDoom is kind of the odd one here with this unique anomaly.

I kid, i kid. But since you bumped this topic, there is some information needed.
- What version of GZDoom are you using?
Do you have any mods/wads/pk3's loaded up?
When does this incident most often occur?
Can you post a CFG as to how your GZDoom is configured? This will help with the maintainers and contributors of GZDoom to determine your issue.
This is assuming you know how to post a CFG. If not, then a Community Guide member may help you out with this.
-
- Lead GZDoom+Raze Developer
- Posts: 48597
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Pixels of the weapon sprite being distorted during movem
The issue is known, the cause for the issue is known, the main problem is that making the needed change may cause secondary issues.
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Pixels of the weapon sprite being distorted during movem
I'm interested.Graf Zahl wrote:The issue is known, the cause for the issue is known, the main problem is that making the needed change may cause secondary issues.
-
- Posts: 2038
- Joined: Thu May 02, 2013 1:27 am
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Pixels of the weapon sprite being distorted during movem
No, PrBoom isn't. GlBoom is. GlBoom also seems to not be using non-integer coordinates, which would mean it wouldn't get the artifacts GZDoom does.lowskill. wrote:PrBoom isn't, it also has a GL 2.1 renderer, and the issue isn't present there either.
It looks like GZDoom is kind of the odd one here with this unique anomaly.
However, you can see artifacts from non-integer upscaling. Take a look at this screenshot of the pistol:

Notice how the upscaled pixels aren't all the same size - that's an artifact of nearest-neighbour upscaling at non-integer scales.
There's also a pretty easy solution for anyone with a decent amount of VRAM - if you enable NormalNx upscaling at >= 3 and set filtering to (bi/tri)linear, you won't get these artifacts. This is what I do, and the game looks just fine:

-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Pixels of the weapon sprite being distorted during movem
That's what I meant, should've been more clear I guess (although I think you can change the render in both executables, not just glboom, but whatever).phantombeta wrote:No, PrBoom isn't. GlBoom is. GlBoom also seems to not be using non-integer coordinates, which would mean it wouldn't get the artifacts GZDoom does.lowskill. wrote:PrBoom isn't, it also has a GL 2.1 renderer, and the issue isn't present there either.
It looks like GZDoom is kind of the odd one here with this unique anomaly.
However, you can see artifacts from non-integer upscaling. Take a look at this screenshot of the pistol:
Notice how the upscaled pixels aren't all the same size - that's an artifact of nearest-neighbour upscaling at non-integer scales.
There's also a pretty easy solution for anyone with a decent amount of VRAM - if you enable NormalNx upscaling at >= 3 and set filtering to (bi/tri)linear, you won't get these artifacts. This is what I do, and the game looks just fine
That's an interesting artifact to be honest, but it's hard to notice (needs some eagle eyes). This however isn't, once spotted, the warping becomes somewhat hard to ignore (even if I focus on something else on the screen I can still see them warping with the corner of my eye).