Ceiling/floor edge render problem
Reported by AlexMax
Created attachment 9 [details]
Screenshot of location where the problem occurs. Move slowly between the sectors and look at the ceiling 'popping'.
This happens on floors too.
Created attachment 17 [details]
Created attachment 18 [details]
Note that position is identical on attachment #17 [details] and attachment #18 [details], only the ange has changed.
Created attachment 19 [details]
Also from the same position
Reduced to minor status
*** Bug 196 has been marked as a duplicate of this bug. ***
Changed to trivial.
No progress, reassigning to myself
If this also happens in vanilla, will need to mark this WONTFIX. Let bug 219 make this irrelevant.
Otherwise, is it an issue? Has anyone checked the other ports?
reassigning to SoM, as he is developing the cardboard renderer
Just checked some other ports:
- Zdoom 2.1.7 doesn't have this bug.
- On the other hand, the software renderer in the newest released prboom *does* have it so I'm guessing it's likely to be in vanilla too. Can't check that right now though.
Confirmed to still exist as of r1431
Confirmed that bug still exists as of 0.5.6
This problem happens due to a condition in R_ScaleFromGlobalAngle(), which will cap the slope of a line to 64*FRACUNIT, likely in an attempt to prevent overflowing 32-bit integers when using that slope value in calculations.
When the player is looking directly along a linedef such that the linedef runs down the center of the screen from top to bottom, the slope of the linedef approaches infinity. Capping the slope makes sense in a fixed-point setting under these circumstances and that is what vanilla Doom does.
I refactored R_ScaleFromGlobalAngle() in r3243 and increased the cap to 1024*FRACUNIT (and later to 256*FRACUNIT). This fixes most of the visual anomalies but is somewhat more prone to integer overflow errors in the renderer. More work will be needed to address overflows, possibly in the form of using double-precision floating-point for the calculations that use this slope value.
Sean improved this issue majorly. There are still necessary renderer fixes but they are beyond the scope of this particular bug.