Pixels of the weapon sprite being distorted during movement

Is there something that doesn't work right in the latest GZDoom? Post about it here.

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!

Pixels of the weapon sprite being distorted during movement

Postby Sinael » Sat Jul 21, 2018 9:06 pm

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.
User avatar
Sinael
Russian Ripman
 
Joined: 18 Oct 2011

Re: Pixels of the weapon sprite being distorted during movem

Postby _mental_ » Sun Jul 29, 2018 2:55 am

Links to videos are broken, got '404 Fire not found!' on all of them.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Pixels of the weapon sprite being distorted during movem

Postby wildweasel » Tue Jul 31, 2018 8:47 am

The links seem to work fine for me.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 16 Jul 2003

Re: Pixels of the weapon sprite being distorted during movem

Postby phantombeta » Fri Nov 01, 2019 9:49 am

Not a bug as far as I know. This is an unfortunate artifact of non-integer nearest-neighbour scaling and movement.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: Brazil, South America, Earth, Orion-Cygnus Arm, Milky Way
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Pixels of the weapon sprite being distorted during movem

Postby Enjay » Fri Nov 01, 2019 1:19 pm

_mental_ wrote:Links to videos are broken, got '404 Fire not found!' on all of them.

It could be because the website security certificate is expired. Firefox blocks it with a message saying as much.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Pixels of the weapon sprite being distorted during movem

Postby lowskill. » Sun Dec 29, 2019 1:54 pm

phantombeta wrote:Not a bug as far as I know. This is an unfortunate artifact of non-integer nearest-neighbour scaling and movement.


Bumping this up since I wanted to post about this as well, but I remembered this topic exists already.

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.
User avatar
lowskill.
GZDoom RO Translator
 
Joined: 05 Nov 2019
Twitch ID: sixhundredsixteen
Github ID: sinisterseed
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Pixels of the weapon sprite being distorted during movem

Postby phantombeta » Sun Dec 29, 2019 2:20 pm

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.

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.
GZDoom also has interpolation for the weapon bobbing (and weapon/PSprite offsets) with non-integer coordinates, which also causes this issue.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: Brazil, South America, Earth, Orion-Cygnus Arm, Milky Way
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Pixels of the weapon sprite being distorted during movem

Postby lowskill. » Sun Dec 29, 2019 2:41 pm

phantombeta wrote:
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.

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.
GZDoom also has interpolation for the weapon bobbing (and weapon/PSprite offsets) with non-integer coordinates, which also causes this issue.


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.
User avatar
lowskill.
GZDoom RO Translator
 
Joined: 05 Nov 2019
Twitch ID: sixhundredsixteen
Github ID: sinisterseed
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Pixels of the weapon sprite being distorted during movem

Postby Redneckerz » Sun Dec 29, 2019 3:38 pm

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.

''Stop right there, criminal scum! You have violated the law.'' :wink:

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?

Lastly:
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.
User avatar
Redneckerz
A Doomer in H.A/R.M's way
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows Vista/7 64-bit
Graphics Processor: nVidia (Legacy GZDoom)

Re: Pixels of the weapon sprite being distorted during movem

Postby Graf Zahl » Sun Dec 29, 2019 3:44 pm

The issue is known, the cause for the issue is known, the main problem is that making the needed change may cause secondary issues.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Pixels of the weapon sprite being distorted during movem

Postby lowskill. » Sun Dec 29, 2019 3:47 pm

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.


I'm interested.
User avatar
lowskill.
GZDoom RO Translator
 
Joined: 05 Nov 2019
Twitch ID: sixhundredsixteen
Github ID: sinisterseed
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Pixels of the weapon sprite being distorted during movem

Postby phantombeta » Sun Dec 29, 2019 3:52 pm

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.

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.
However, you can see artifacts from non-integer upscaling. Take a look at this screenshot of the pistol:
Image
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:
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: Brazil, South America, Earth, Orion-Cygnus Arm, Milky Way
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Pixels of the weapon sprite being distorted during movem

Postby lowskill. » Sun Dec 29, 2019 4:01 pm

phantombeta wrote:
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.

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.
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 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).

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).
User avatar
lowskill.
GZDoom RO Translator
 
Joined: 05 Nov 2019
Twitch ID: sixhundredsixteen
Github ID: sinisterseed
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests