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

Moderator: Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

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

Postby Zodomaniac » Wed Nov 14, 2018 7:20 am

(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 236 times
SG translucent bottom line.png
User avatar
Zodomaniac
 
Joined: 03 Apr 2018

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

Postby Graf Zahl » Wed Nov 14, 2018 9:19 am

Is this the original weapon sprites or some modifications that are not easily recognizable on a screenshot?
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Chris » Wed Nov 14, 2018 9:31 am

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
Chris
 
Joined: 17 Jul 2003

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

Postby Graf Zahl » Wed Nov 14, 2018 10:29 am

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.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Sidney Ducklebanks » Wed Nov 14, 2018 10:42 am

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.
Sidney Ducklebanks
 

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

Postby Zodomaniac » Wed Nov 14, 2018 10:46 am

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
Zodomaniac
 
Joined: 03 Apr 2018

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

Postby Graf Zahl » Wed Nov 14, 2018 12:13 pm

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Zodomaniac » Wed Nov 14, 2018 12:28 pm

Maybe your change eliminated the pixel gap with disabled texture filter? Because it appears only with texture filter enabled.
User avatar
Zodomaniac
 
Joined: 03 Apr 2018

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

Postby drfrag » Wed Nov 14, 2018 2:37 pm

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
drfrag
I.R developer, I.R smart
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain

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

Postby Enjay » Wed Nov 14, 2018 3:01 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Zodomaniac » Sun Nov 18, 2018 3:03 am

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
Zodomaniac
 
Joined: 03 Apr 2018

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

Postby Graf Zahl » Sun Nov 18, 2018 3:32 am

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Zodomaniac » Sun Nov 18, 2018 11:37 am

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?
User avatar
Zodomaniac
 
Joined: 03 Apr 2018


Return to OpenGL Renderer Bugs

Who is online

Users browsing this forum: No registered users and 1 guest