[Fixed] Texturing problem

Bugs that have been investigated and resolved somehow.

Moderator: Developers

Texturing problem

Postby Kappes Buur » Fri Jul 08, 2011 4:21 pm

This thread over at Doomworld
http://www.doomworld.com/vb/doom-editin ... -renderer/
made me curious about how ZDoom renders non-power-of-2 textures.

Whenever this topic came up in the past, the simple answers has always been 'Use power-of-2 textures'.
However, in the examples given by GoatAvenger in his thread and by me below

Spoiler:

it clearly shows that, at present, only alternate rows are rendered incorrectly.

Can this not be fixed to show everything correctly ?
Last edited by Kappes Buur on Fri Jul 08, 2011 4:32 pm, edited 1 time in total.
User avatar
Kappes Buur
 
Joined: 17 Jul 2003
Location: British Columbia

Re: Texturing problem

Postby Graf Zahl » Fri Jul 08, 2011 4:25 pm

Of course it could be fixed. Even Boom had a proper routine for such textures. ZDoom just never got that far. The main issue is that it can't perform as well as a power of two version and had to be coded separately.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: Texturing problem

Postby Kappes Buur » Sat Jul 09, 2011 10:03 am

Just wondering, why this happens only on every other tier.
To me that would suggest, that the rendering code is working correctly at least 50% of the time.

Maybe I should have mentioned, that the above example shows a 72h x 24w gray texture on a linedef of 448 units and a sector with a height of 512 units. So, for the time being, one could use a hack by inserting a sector, 2 map units smaller on each side, with a 68 map units height (floor at 57 and ceiling at 127), to have it show correctly.

Spoiler:


The drawback is, that one can see the flaw when close to the wall

Spoiler:
User avatar
Kappes Buur
 
Joined: 17 Jul 2003
Location: British Columbia

Re: Texturing problem

Postby randi » Sun Jul 10, 2011 1:46 pm

You should use a real texture instead of solid gray. I think you'll come to a much different conclusion about what's "working".
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Re: Texturing problem

Postby Project Dark Fox » Sun Jul 10, 2011 2:00 pm

Disregard, I'm talking out of my ass.
Last edited by Project Dark Fox on Mon Jul 11, 2011 12:01 pm, edited 1 time in total.
User avatar
Project Dark Fox
Nightmare Fuel Station Attendant
 
Joined: 14 Jul 2005
Location: The Gutter

Re: Texturing problem

Postby Kappes Buur » Sun Jul 10, 2011 4:43 pm

I really don't want to flog a dead horse here, so I just make one more post on the subject

randy wrote:You should use a real texture instead of solid gray. I think you'll come to a much different conclusion about what's "working".


Whatever non-power-of-2 texture I use, the result is always the same. Every even tier is rendered correctly and every odd tier is rendered with tutti-frutti.

Spoiler:


If this cannot be fixed, well, so be it.
User avatar
Kappes Buur
 
Joined: 17 Jul 2003
Location: British Columbia

Re: Texturing problem

Postby randi » Sun Apr 22, 2012 9:42 pm

Fixed.

Kappes Buur wrote:Every even tier is rendered correctly and every odd tier is rendered with tutti-frutti.

So, maybe I should have been more specific. For rendering purposes, the texture's height is rounded up to the next power of 2. Since this is taller than the texture is in reality, the extra pixels at the bottom come from the next column to the right, since columns are stored consecutively in memory. There is no column to the right of the right-most column, so the extra pixels drawn at the bottom of that column are garbage.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Re: Texturing problem

Postby Graf Zahl » Mon Apr 23, 2012 1:39 am

Nice to see this one finally being resolved.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: Texturing problem

Postby Gez » Mon Apr 23, 2012 5:13 am

Not entirely fixed, though. I'll make a new thread for the remaining issue.
Gez
 
Joined: 06 Jul 2007


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests