[2.1.4] Opening menu triggers viewport misplacement

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
MartinHowe
Posts: 2103
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Linux Mint
Graphics Processor: nVidia with Vulkan support
Location: East Suffolk (UK)

[2.1.4] Opening menu triggers viewport misplacement

Post by MartinHowe »

OK, the one-pixel yellow line at the bottom of the screen just under the HUD is back. It is absent until you actvate the menu in-game; as soon as you press the ESC key, a thin yellow line appears at the bottom. This persists over starting a new game, too. This is present in at least one way in 2.1.3 as well; in GZDoom 1.0.18, playing W3D-TC, whenever a sliding door opens or closes you can see the movement of the door "through" the one-pixel gap.

Screenshot: (1280x1024 with 10-pixel black border added; otherwise defect is too small to see):
Spoiler:
Startup log:
Spoiler:
* Graphics chipset - Radeon Mobile 7500
* Display aspect ratio - 5:4 with square pixels
* Display mode - 5:4,1280x1024

Oh and sometimes when triggering menus quickly, colours flash inverse for a split second then back; it's like playing CRINGE.WAD on LSD :)
User avatar
Siggi
Posts: 3288
Joined: Sun Oct 03, 2004 8:57 am
Preferred Pronouns: They/Them
Location: South Africa

Post by Siggi »

That yellow strip is always there. It appears yellow when a colour fade is used.
It's infact a little strip of void if you like which keeps whatever info was sent there last. I too have noticed it's existence, but don't find it all that annoying.

I thought it was an inaccuracy in the hud placement code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Psycho Siggi wrote: I thought it was an inaccuracy in the hud placement code.

It is. The scaling for the status bar is off by one pixel due to roundoff errors.
User avatar
MartinHowe
Posts: 2103
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Linux Mint
Graphics Processor: nVidia with Vulkan support
Location: East Suffolk (UK)

Post by MartinHowe »

What I don't get is why it only manifests once the menu is triggered with the ESC key; or is it an HOM-like effect? Anyway, seems to me the viewport height should be derived as (screen_height minus scaled_statusbar_height), with the scaled statusbar positioned flush to the bottom of the screen; that ought to fix it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It is a HOM-like effect. The only thing that is drawn to the last line is the menu blend.
User avatar
Nash
 
 
Posts: 17511
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

This seems to have been fixed in one of the development revisions after 2.1.7.

I didn't keep track of which revision exactly, but I *think* it was when Randy added the new D3DFB code.

The bug is still in GZDoom 1.0.22, though.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

The bug hasn't been fixed. If it doesn't appear it's just luck but in 1280x1024 the status bar scaling is still off by one pixel
User avatar
Nash
 
 
Posts: 17511
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

The HOM doesn't appear for me in ZDoom R445M at 1280 x 1024. Weird?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It can be that by rendering it as a texture the bottom scanline is cut off so the garbage doesn't show.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Seems your 'fix' was really a bug. ;)

From today's changelog:
- Fixed: The quad FBD3D draws to the screen was one pixel too tall.
User avatar
Nash
 
 
Posts: 17511
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

Oh noes. :(
User avatar
MartinHowe
Posts: 2103
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Linux Mint
Graphics Processor: nVidia with Vulkan support
Location: East Suffolk (UK)

Post by MartinHowe »

Interestingly enough, JFSW and JFDuke3D have an occasional similar problem; again these are OpenGL ports of traditional 2.5D S/W rendered FPS games... there's probably a moral there somewhere :)

Image Image
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

This has nothing to do with 2.5d. Only with the fact that the coordinate scaling to 1024 pixels height creates an imprecision in the calculation which results in an off-by-one result.
User avatar
Nash
 
 
Posts: 17511
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

I wouldn't know how difficult it is to fix, but can't you just like, fill the last row of the viewport's pixels with the top row of status bar pixels (in other words, just copy 1 x 320 pixels from the top of the status bar) if the screen resolution is in multiples of 1024?

Just a guess. I know jack about ZDoom coding and I would understand if it's not that easy or it just won't work that way. :)

EDIT: And just wondering, what was wrong with that unintended bug that Randy fixed? Eventhough it was a bug, I thought it did a good job in "fixing" it. I certainly didn't think it was a bug and assumed it was fixed (see my post before Graf's above)! I would just leave it "unfixed", heh.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

That's all easier said than done. The status bar is drawn on a virtual 320x200 screen but when scaling the coordinates it calculates different values for the status bar's top plus the status bar's height and the bottom of the screen. This isn't easily fixable by 'just' drawing an additional line to the screen and most certainly not by drawing the screen one pixel too tall. That's just not correct.

Return to “Closed Bugs [GZDoom]”