Integer scaling for HUD elements

Moderator: Raze Developers

Posts: 54
Joined: Thu Jan 17, 2013 9:28 pm

Integer scaling for HUD elements

Post by Alexandra »

I'd like to avoid uneven scaling artifacts in each game's 2D HUD elements.

I have a 1080p LCD display and play Raze in lower resolutions like 640x480. I've spent several hours over the last year across several Raze versions trying to find evenly scaled HUD settings for each game (for any game, really) but have been unable to do so.

There are a lot of moving parts here, including Raze's video mode, (forced?) aspect ratio, custom resolution settings, level statistics scale, crosshair scale, message scale, perhaps a few others. Listing the various settings I've tested (assuming I could recall them) seems irrelevant since I have not found any that exhibit 1:1 scaling. I've tried the various resolution presets and many combinations of custom resolution + scaling settings.

Some images to demonstrate uneven scaling of 2D HUD elements:

A 640x480 Raze screenshot. Here's the same shot scaled 300% w/ Nearest Neighbor scaling in Photoshop, which will make the bad scaling much easier to notice.

Detail showing three areas of the 300% screenshot that show obviously uneven / non-integer scaling artifacts. Ideally any given letter or number, for example, would scale identically in each instance it appears. You can see they do not. Some have fat bottoms, fat tops, one odd pixel that is larger, etc. (Look at the "hole" in the capital Ps.) I've found the Level Statistics display to be an excellent at-a-glance test for uneven scaling; it's very obvious in that.

Different 640x480 screenshot showing hud options -> level statistics scale = 1.00, with 300% zoomed inlay to better show non-integer scaling artifacts.

I'd like to request either:
  • advice from someone more up on the behind-the-scenes Raze math on relatively low-res display mode scale settings (1024x768 or below) that exhibit 1:1 pixel scaling in HUD, crosshair, message text, etc. (Acknowledging the shortcomings of fixed-pixel-size digital displays vs. analog CRTs, I'd find it acceptable to switch to a non-4:3 presentation to achieve clean integer scaling.)
Or, if such settings don't currently exist:
  • implementation of some sort of easy integer scale setting for these elements. perhaps built-in presets, or a new cvar setting, or something else.
This has been bothering me since the start, ha, so thought I'd finally make the ask. Thanks for any help / feature consideration.

Return to “Feature Suggestions [Raze]”