Scaling issues on translucent, wrapped midtextures

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
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Scaling issues on translucent, wrapped midtextures

Post by InsanityBringer »

Sample map, and a screenshot (but really it doesn't show you much, the bug generates absolute noise)

I've been noticing in recent dev builds (since the FP rewrite most likely, as it looks alright in ZDoom 2.8.1) that some maps like a few KDIZD maps from what I remember, which use translucent midtextures, if they enable the "wrap midtexture" flag on the line, the texture is scaled horribly to the point where its an absolute moirefest. The sample wad demonstrates this, with one line using wrapped midtextures and no translucency, while the other has wrapped midtextures and translucency. When rendered in recent builds of ZDoom (I tested the latest one for this), the translucent one exhibits the scaling artifacts, while the opaque one doesn't.

From further testing, translucent midtextures are fine. Its just wrapped ones that aren't.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Scaling issues on translucent, wrapped midtextures

Post by Graf Zahl »

This looks like something for dpJudas. It's still present in the latest build as of today.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: Scaling issues on translucent, wrapped midtextures

Post by Edward-san »

Could it be the same as the one in Daedalus map25 at coordinates 227 -1713 on the right side?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Scaling issues on translucent, wrapped midtextures

Post by Graf Zahl »

Yes, looks exactly the same.
dpJudas
 
 
Posts: 3163
Joined: Sat May 28, 2016 1:01 pm

Re: Scaling issues on translucent, wrapped midtextures

Post by dpJudas »

Interesting. This doesn't seem to be happening in QZDoom: http://imgur.com/a/77KIw (top image true color, bottom palette)

That means it must be an issue with wallscan, which I rewrote in QZDoom to fix a buffer overrun situation. I can't really fix the current wallscan, its code is too cryptic to me, but I can backport my rewritten wallscan to ZDoom if you'd like.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Scaling issues on translucent, wrapped midtextures

Post by Graf Zahl »

That's definitely worth a try. That is, unless it affects performance too much.
On the other hand, getting rid of that mess of code would definitely be an advantage.
dpJudas
 
 
Posts: 3163
Joined: Sat May 28, 2016 1:01 pm

Re: Scaling issues on translucent, wrapped midtextures

Post by dpJudas »

Honestly, I don't know how well it competes with the original. I don't know if the original did it in such a convoluted way for some speed reason, or just to make it complicated for itself. With code one never knows. :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Scaling issues on translucent, wrapped midtextures

Post by Graf Zahl »

Well, the code originates from Build, I think that says it all...
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: Scaling issues on translucent, wrapped midtextures

Post by Gez »

All the more reason to get rid of it, IMO.
dpJudas
 
 
Posts: 3163
Joined: Sat May 28, 2016 1:01 pm

Re: Scaling issues on translucent, wrapped midtextures

Post by dpJudas »

Alright, here's the pull request with my rewritten wallscan: https://github.com/rheit/zdoom/pull/892

Note that if you merge this, wallscan/maskwallscan/transmaskwallscan can be removed from the list of build dependencies on the wiki.
User avatar
Rachael
Posts: 13913
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Scaling issues on translucent, wrapped midtextures

Post by Rachael »

Just to be sure, I trialed your fix through the swimming marine test. Something I randomly invented for the purposes of testing the wall masking drawer. :P

It passed. :P
Attachments
swimming-marine-test.wad
(1.49 KiB) Downloaded 38 times
dpJudas
 
 
Posts: 3163
Joined: Sat May 28, 2016 1:01 pm

Re: Scaling issues on translucent, wrapped midtextures

Post by dpJudas »

Hmm, not sure what that wad tests exactly. :) One thing that strikes me as a little odd, though, is that the vertical position of the marine is further up when seen from the front.
User avatar
Rachael
Posts: 13913
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Scaling issues on translucent, wrapped midtextures

Post by Rachael »

It's to test to see if the midtex is clipped through the floor, or if it is rendered through the floor. The sprites I didn't need to test, because they were still going through the floor just fine.

I dunno - like I said I randomly invented it. I just wanted to be sure the new wall drawers worked as expected.

You could say, everything went swimmingly in that test. ;)

Okay, okay, I'll stop.
dpJudas
 
 
Posts: 3163
Joined: Sat May 28, 2016 1:01 pm

Re: Scaling issues on translucent, wrapped midtextures

Post by dpJudas »

Ah, but you've been looking at the new wallscan function for quite a while in QZDoom. It, and my earlier truecolor branch, has been using it there for 6 months soon in both pal and true color.

One of its changes in an ocean of changes! ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Scaling issues on translucent, wrapped midtextures

Post by Graf Zahl »

Looks correct, no apparent performance hit, and getting rid of some Build code. Can it get any better...? ;)
Post Reply

Return to “Closed Bugs [GZDoom]”