sezero / uhexen2

Hexen II: Hammer of Thyrion -- A cross-platform port of Hexen II game.
https://sourceforge.net/projects/uhexen2/
73 stars 14 forks source link

Texture filtering of main menu font #70

Closed walkerware1 closed 4 months ago

walkerware1 commented 4 months ago

Hello. Little addition to "fix of artifacts with scaled UI" (https://sourceforge.net/p/uhexen2/uhexen2/ci/c586cb12540ee1aa3445f37158dd06a18b9d0970/) ... The linear-filtered font of main menu looks strange against other pixelated UI parts and small type font. Maybe apply fix in "/engine/h2shared/gl_draw.c" like:

-551  char_menufonttexture = GL_LoadTexture ("menufont", p->data, p->width, p->height, TEX_ALPHA|TEX_LINEAR);

+551  char_menufonttexture = GL_LoadTexture ("menufont", p->data, p->width, p->height, TEX_ALPHA|TEX_NEAREST);

I tested this and the menu looked better this way.

sezero commented 4 months ago

Doesn't it look a bit uglier when you increase the scale? (options menu -> scale slider)

walkerware1 commented 4 months ago

I use Hexen2 with a large UI scale value (scale slider), adjusting it to get a "pixel perfect" effect and as close to the original. And in my opinion, it looks much better that way. I also tested smaller values, "nearest" looks just as good. It is also worth mentioning that an important option in this case is "Video Modes->NPOT textures" enabled. But without it the rest of the UI graphics including HUD also suffers. I would make this option enabled by default. By the way, another port - UQE Hexen II v1.18 also uses "nearest" way and NPOT-tex of menu texturing. (at least that's how it looks) Screenshots of linear/nearest/UQE-port for visual comparison: https://drive.google.com/drive/folders/1nlNFO2m8QeKyWroc4g9Psv_mB_5RVymQ

sezero commented 4 months ago

OK, I asked my other dev friend Steve about this: he is of the opinion that it doesn't look as good, therefore not applying this.

Thanks.