(Bi/tri)linear texture filter causes translucent weap bottom

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.
Post Reply
User avatar
Zodomaniac
Posts: 22
Joined: Tue Apr 03, 2018 6:59 am

(Bi/tri)linear texture filter causes translucent weap bottom

Post by Zodomaniac »

(Bi/tri)linear texture filter treats the bottom pixel line of weapon sprite as transparent, though graphic editors reveal that it is not, and this doesn't happen without texture filtering.
So one has to play either with no texture filtering and jagged graphics, or cope with bright environment graphics and effects flashing through the weapon.
The screens were made when standing on pentagrams in Doom Slayer Chronicles https://www.moddb.com/mods/doom-slayer-chronicles
Attachments
SSG translucent bottom line.png
SSG translucent bottom line.png (208.68 KiB) Viewed 499 times
SG translucent bottom line.png
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Graf Zahl »

Is this the original weapon sprites or some modifications that are not easily recognizable on a screenshot?
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Chris »

Perhaps the weapon sprite is rendered using wrapping UV mode, so it's blending the bottom texels with the transparent top and getting killed by alpha-testing?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Graf Zahl »

That shouldn't be. I already shift this down by one pixel to avoid artifacts. That's why I was asking. This may also be screen resolution dependent.
Guest

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Guest »

Those are the original, IWAD weapon sprites, the screen resolution is 1920x1080 fullscreen.
Graf, where have you introduced this 1 pixel downshift? I'm still using the 3.5.1 release, maybe that's why.
User avatar
Zodomaniac
Posts: 22
Joined: Tue Apr 03, 2018 6:59 am

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Zodomaniac »

At which point have you made this shift 1 pixel down? I've just discovered GZDoom current version is 3.6.0 while I'm using 3.5.1.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Graf Zahl »

Very long ago. A few years ago there even was a user who was bothered so much by it that he threatened to switch to other ports
User avatar
Zodomaniac
Posts: 22
Joined: Tue Apr 03, 2018 6:59 am

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Zodomaniac »

Maybe your change eliminated the pixel gap with disabled texture filter? Because it appears only with texture filter enabled.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by drfrag »

As far as i knew that WEAPON_FUDGE_Y thing was only in software. I also think this could be resolution-specific.
That mod is too big for me to download. I wonder if this could be a driver problem.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Enjay »

Pretty sure I remember that original issue and the fix being implemented. If I'm right, it was indeed a very long time ago.
User avatar
Zodomaniac
Posts: 22
Joined: Tue Apr 03, 2018 6:59 am

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Zodomaniac »

Maybe it would make sense to extrapolate the bottom pixel line to the out-of-screen area, so that the texture filter mixes just identical pixels of the bottom line?
Or render the mirrored weapon sprite below the screen for same effect.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Graf Zahl »

All that won't help. The effect comes from adding a transparent outline to sprites to improve texture filtering around their edges. In this case it simply boils down to guesswork to alter this because the texture manager cannot know which edge of a sprite will be aligned to the screen when it gets rendered. It's either completely on or completely off.
User avatar
Zodomaniac
Posts: 22
Joined: Tue Apr 03, 2018 6:59 am

Re: (Bi/tri)linear texture filter causes translucent weap bo

Post by Zodomaniac »

Graf Zahl wrote:All that won't help. The effect comes from adding a transparent outline to sprites to improve texture filtering around their edges. In this case it simply boils down to guesswork to alter this because the texture manager cannot know which edge of a sprite will be aligned to the screen when it gets rendered. It's either completely on or completely off.
Is there an option of disabling this transparent outline of sprites?
Post Reply

Return to “Closed Bugs [GZDoom]”