[Fixed] Sidescroll-Texture misalignment by one pixel

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Sidescroll-Texture misalignment by one pixel

Postby Setsunaaa » Sun Dec 14, 2003 4:56 am

In E3M3 (as example) which uses some sidecrolling texture the corners where they meet is off by one textxel, this applies to every second corner in the area where it hit my eye, it is resolution-independent.
You have to hit pause to see it perfectly of course.
Compared to the original which has better texture alignment in that corners, although not 100% perfect too, but closer, like the original doom doesn't seem to clip/align at pixel level and zdoom at textel level.

See attached savegame from 60.cab
Setsunaaa
 
Joined: 30 Nov 2003

Postby Setsunaaa » Sun Dec 14, 2003 4:58 am

Argh, I should really attach it, since I missed the ".zds not allowed"...
You do not have the required permissions to view the files attached to this post.
Setsunaaa
 
Joined: 30 Nov 2003

Postby Chris » Sun Dec 14, 2003 5:37 am

For future reference, you can rename the .zds to .zds.png and attach it. It'll display the image, as a png, and still be useable as a savegame after removing the .png.
User avatar
Chris
 
Joined: 17 Jul 2003

Postby Graf Zahl » Sun Dec 14, 2003 5:54 am

That's due to a length that is not a full integer. All the diagonal walls are treated in the editor as if they were 91 units long because the level format doesen't support fractional parts. In reality, however they are only 90,5096679918780831233080783494207 units long and obviously this can create slight rendering inaccuracies. IMHO there is nothing wrong with it and if somebody is to blame it's the level designer. Stuff like this probably wasn't noticable at all in 320x200.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Setsunaaa » Sun Dec 14, 2003 8:31 am

If you look at it in the original Doom you _can_ see the half textel, this is no imagination, like I wrote in my first post.
In zdoom it is rounded. SQRT(64^2*2) is 90.5 something, I know. But zdoom rounds down instead of up. This _can_ be done in integer correctly. It just looks bad right now.
BTW: I bet Sandy Petersen knew about that problem when he created that map.
Setsunaaa
 
Joined: 30 Nov 2003

Postby Chris » Sun Dec 14, 2003 9:08 am

SQRT(64^2*2) is 90.5 something


Right, so if the last column of a wall displays the half of the 90th texel and the next wall displays the start of the 91st texel, there will be a small innacuracy when rendering the two walls with an kind of magnification. And AFAIK, (Z)Doom doesn't have an "end texel" number to change this (basically, what I believe it does is something like "start at this texel column, and just increase as you go along the wall"). Granted there could probably be a very small scale value to make sure the last texel column is displayed in full, but the decimal precision might not be good enough to do this(EDIT: especially if it may cause it to accidently jump to the next texel which would be even worse as this could introduce wrapping on walls/textures that may not be designed for it). And even if it is precise enough, it might not be worth the hassle of implementing.
User avatar
Chris
 
Joined: 17 Jul 2003

Postby Cyb » Sun Dec 14, 2003 12:39 pm

could we get a little more anal please
Cyb
 
Joined: 15 Jul 2003

Postby Ultraviolet » Sun Dec 14, 2003 6:29 pm

I'll try.

Cyb, you make such fucking useless posts, why don't you go back to DOOMWORLD where that's welcome? And what's with your name anyway? You were too lazy to type out "Cyberdemon" or "Cyberwhatever" or something? You fucking retard. And what's with your title? It's BLUE and you don't even use capitalization or punctuation. Were you too lazy to hack the forums to change the title color or what? You dumbass. I hate you. Your title contains the word "tit." I know you were trying to cleverly disguise it inside the word "title" but you can't fucking pull one over on me you little shit. That's very degrading to women and I demand you take it back RIGHT THIS INSTANT YOUNG MAN.
User avatar
Ultraviolet
AKA "Faint"
 
Joined: 15 Jul 2003
Location: PROJECT DETAILS CLASSIFIED.

Postby Shockwav3 » Sun Dec 14, 2003 7:10 pm

o_0
User avatar
Shockwav3
L33t's goo 2 huhwayiee
 
Joined: 11 Nov 2003
Location: Duesseldorf, Germany

Postby Cyb » Sun Dec 14, 2003 8:33 pm

I said anal, not retarded
Cyb
 
Joined: 15 Jul 2003

Postby Ultraviolet » Mon Dec 15, 2003 12:26 am

Guess I tried too hard.
User avatar
Ultraviolet
AKA "Faint"
 
Joined: 15 Jul 2003
Location: PROJECT DETAILS CLASSIFIED.

Postby HotWax » Mon Dec 15, 2003 2:55 pm

Cyb wrote:I said anal, not retarded


Does this mean you're not going to change my diaper anymore?
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Ty Halderman » Mon Dec 15, 2003 10:11 pm

Observation: Anal and retarded are not mutually exclusive :lol:
User avatar
Ty Halderman
I'm free! ...or at least inexpensive.
... in loving memory ...
 
Joined: 17 Jul 2003
Location: New Orleans LA

Postby Hirogen2 » Tue Dec 16, 2003 7:56 am

Ty Halderman wrote:Observation: Anal and retarded are not mutually exclusive :lol:

pthread_mutex_lock(...)
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby randi » Fri Jan 02, 2004 9:46 pm

Chris wrote:AFAIK, (Z)Doom doesn't have an "end texel" number to change this (basically, what I believe it does is something like "start at this texel column, and just increase as you go along the wall").

Incorrect. What you describe is the way Doom did it. ZDoom (and Build) keep track of what texel to start drawing at and how many texels fit across the width of the wall (in Build, this is a wall's xrepeat*8). Because of this, the end texel visible on a wall in Doom can fluctuate depending on what angle you view it at, even if the wall is a perfectly integral length. With ZDoom (and Build), the end texel is always the same, and it always gets fully drawn, so it always looks the same no matter how you view it.

The fix for this "bug" is quite easy, too: Just round the length to nearest instead of down. It should also look better than it did in Doom, since you will always see the full 91st texel instead of different amounts of it depending on how you look at the wall. Note that this isn't going to change any existing savegames, since this information is stored in the savegame, so you need to start a new map to see a difference.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests