(Bi/tri)linear texture filter causes translucent weap bottom
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.
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.
- Zodomaniac
- Posts: 22
- Joined: Tue Apr 03, 2018 6:59 am
(Bi/tri)linear texture filter causes translucent weap bottom
(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
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
- Graf Zahl
- 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
Is this the original weapon sprites or some modifications that are not easily recognizable on a screenshot?
- 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
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?
- Graf Zahl
- 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
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.
Re: (Bi/tri)linear texture filter causes translucent weap bo
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.
Graf, where have you introduced this 1 pixel downshift? I'm still using the 3.5.1 release, maybe that's why.
- Zodomaniac
- Posts: 22
- Joined: Tue Apr 03, 2018 6:59 am
Re: (Bi/tri)linear texture filter causes translucent weap bo
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.
- Graf Zahl
- 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
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
- Zodomaniac
- Posts: 22
- Joined: Tue Apr 03, 2018 6:59 am
Re: (Bi/tri)linear texture filter causes translucent weap bo
Maybe your change eliminated the pixel gap with disabled texture filter? Because it appears only with texture filter enabled.
- 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
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.
That mod is too big for me to download. I wonder if this could be a driver problem.
Re: (Bi/tri)linear texture filter causes translucent weap bo
Pretty sure I remember that original issue and the fix being implemented. If I'm right, it was indeed a very long time ago.
- Zodomaniac
- Posts: 22
- Joined: Tue Apr 03, 2018 6:59 am
Re: (Bi/tri)linear texture filter causes translucent weap bo
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.
Or render the mirrored weapon sprite below the screen for same effect.
- Graf Zahl
- 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
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.
- Zodomaniac
- Posts: 22
- Joined: Tue Apr 03, 2018 6:59 am
Re: (Bi/tri)linear texture filter causes translucent weap bo
Is there an option of disabling this transparent outline of sprites?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.