[Can't fix] Offset issue with DrawBar

Bugs that have been investigated and resolved somehow.

Moderators: Developers, ZDoom.org Team

Offset issue with DrawBar

Postby Blue Shadow » Fri Jun 16, 2017 10:13 pm

Tested/produced with: 3.1.0 64-bit, 3.2pre-64-g2ff492d 64-bit


There seems to be an offset problem with DrawBar when drawing the bar reversed (passing SHADER_REVERSE flag):

(Click for full size)
Image

The two bars you see are drawn exactly the same, with the exception that the bottom one is drawn in reverse, yet it's offset by on pixel to the left. Oddly, if you scale the HUD up like say 2x, the bar is drawn correctly.

(Click for full size)
Image

Now, this appears to affect some screen resolution, like 800x600 and 1024x768. On 1366x768, the biggest I can test this on, the bar is drawn fine.

Here is a demo file:

bar_test.pk3
(2.29 KiB) Downloaded 3 times

To test, load it with Doom. Switch to the fullscreen HUD while making sure to disable scaling. From the console: 'give ammo'. Fire your pistol seven times.

And as not to overlook this: the non-reversed bar (the top one) is drawn perfectly fine regardless of resolution or HUD scale.
User avatar
Blue Shadow
 
Joined: 14 Nov 2010

Re: Offset issue with DrawBar

Postby Graf Zahl » Sat Aug 12, 2017 5:44 am

If you do not draw at the same coordinates there's no guarantee that it will end up at the same coordinate.
This is simply a rounding problem when the values get scaled. Since ultimately they end up on a display consisting of discrete pixels it can just happen that the values differ by 1.
Sorry, but this cannot be changed.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest