Tracker: Bugs

3 Non-power-of-two textures don't work properly on 2S lines! - ID: 980365
Last Update: Comment added ( proff_fs )

Hello, Quasar once again. boris of WIP fame was testing
a map he's working on in various BOOM-based and BOOM-
compatible engines, and he found that all the BOOM-
based engines do not handle textures with heights that
are not a power of two properly on 2S lines.

Here is a screenshot of what happens:
http://paci-fist.org/~boris/media/pow2tex.jpg

The shot in the background is from zdoom and shows
the expected results. The texture is 38 tall, and in
zdoom, it tiles at the 39th pixel as would be reasonably
expected. However, the foreground shot, which is of
prboom 2.2.4 displaying the same scene, shows the
problem, which Eternity also suffers.

It seems that the texture is not being tiled until the next
power of two (64 in this case). The intervening area is
being filled with a wide band of a tutti-fruiti-like color.

I don't currently know what causes this, and I am
probably not going to be able to isolate the cause
myself. The texture works fine on 1S lines, however, so
clearly there is some error in the 2S line rendering
pipeline that leads to this behavior. I hope we can fix
this ASAP.


James Haley ( quasar_te ) - 2004-06-26 11:25:49 PDT

3

Open

Accepted

Colin Phipps

Software Renderer

None

Public


Comments ( 9 )

Date: 2004-09-05 04:27:44 PDT
Sender: proff_fsProject AdminAccepting Donations

Logged In: YES
user_id=18721

I partly fixed it for 2.2.4 now. There are some problems
though, because dc_texheight == 0 is special cased. You can
see this in Doom2 MAP01 if you jump outside the grates where
the chainsaw is. I have attached a patch. This will not go into
the 2.2.5 release, because of the problems.



Date: 2004-08-23 11:22:04 PDT
Sender: proff_fsProject AdminAccepting Donations

Logged In: YES
user_id=18721

I fixed it for 2.3.x (revision 1084) as a side effect when
working on something else. I won't fix it for 2.2.x as it would
be much more complicated to do so (the new software
renderer is so much better). The only remaining question is,
should this really be compatibility optioned? If so, it won't be
as easy ;)


Date: 2004-08-22 04:32:37 PDT
Sender: proff_fsProject AdminAccepting Donations

Logged In: YES
user_id=18721

I just checked how the original Doom did it (1.9 Ultimate
Doom) and there it is the same as the current behaviour of
PrBoom. I don't think it will be easy to fix this like you want,
because the clipping would need to be done differently. If it
would ever be fixed, then I think it should be compatibility
optioned. I won't work further on this, if someone wants to do
it, then I have no problem including it.



Date: 2004-08-21 14:21:12 PDT
Sender: quasar_te

Logged In: YES
user_id=315121

Textures on 2S lines aren't supposed to tile; the error is that
the yellow portion of the patch wasn't being clipped by the
height of the texture. zdoom and other ports do this
correctly, pure BOOM-based ports do not. They show the
entire patch if it is taller than the texture.

Remember, my original description of this problem was wrong
because I wasn't thinking about it properly. The teeth texture
should be cut off before the yellow part and then you should
be able to see the wall behind it like you can in your GL
renderer. I'm not sure if changing this could cause
compatibility problems or not, but the behavior does seem
incorrect to me.


Date: 2004-08-18 13:17:24 PDT
Sender: proff_fsProject AdminAccepting Donations

Logged In: YES
user_id=18721

Hmm, I just checked opengl (2.3.0) and there the texture isn't
repeated, but is transparent below the texture itself. Which
behaviour is correct?


Date: 2004-08-18 13:06:00 PDT
Sender: proff_fsProject AdminAccepting Donations

Logged In: YES
user_id=18721

I think I got it fixed, the patch should be tested with other
levels as well, to be sure nothing broke.



Date: 2004-08-17 23:56:40 PDT
Sender: quasar_te

Logged In: YES
user_id=315121

Here is boris' test level:

http://paci-fist.org/~boris/media/pow2tex.wad

I'm not sure where in the level the error shows up, but look
for some teeth with ugly bright yellow under them. That's the
texture that's not drawing properly.


Date: 2004-06-27 01:10:28 PDT
Sender: proff_fsProject AdminAccepting Donations

Logged In: YES
user_id=18721

Does this happen in 2.3.0 as well?
Could you attach a (small) test level?


Date: 2004-06-26 11:45:41 PDT
Sender: quasar_te

Logged In: YES
user_id=315121

Quasar again. Sorry, this is erroneous information made on
some bad assumptions. What is actually going on here is that
the teeth texture is on a 2S line in front of the wall behind it.
What is being done wrong is that the 2S texture's drawing
height is being determined by the height of the patch in the
texture, rather than the texture's height. The yellow part is
not tutti fruiti, but is actually part of the patch which is
supposed to be cut off by the texture's height. Please
analyze this problem and contact me about it ASAP.


Attached Files ( 3 )

Filename Description Download
prboom224_pow2tex.diff Download
prboom230_pow2tex.diff Download
prboom224_pow2tex_2.patch Better solution, but not perfect. Download

Changes ( 8 )

Field Old Value Date By
File Added 100376: prboom224_pow2tex_2.patch 2004-09-05 04:27:44 PDT proff_fs
category_id None 2004-08-23 11:22:04 PDT proff_fs
resolution_id None 2004-08-23 11:22:04 PDT proff_fs
priority 5 2004-08-23 11:22:04 PDT proff_fs
assigned_to nobody 2004-08-23 11:22:04 PDT proff_fs
artifact_group_id stable branch 2004-08-22 04:32:37 PDT proff_fs
File Added 98316: prboom230_pow2tex.diff 2004-08-18 13:07:03 PDT proff_fs
File Added 98315: prboom224_pow2tex.diff 2004-08-18 13:06:00 PDT proff_fs