LTCHIPS / rottexpr

A Rise Of The Triad Source Port with additional gameplay options and more...
GNU General Public License v2.0
97 stars 27 forks source link

floor rendering fix #48

Open zZeck opened 3 years ago

zZeck commented 3 years ago

The original code has insufficient precision in the xstep and ystep used for floor/ceiling. This lack of precision results in very visible error accumulating as DrawRow renders left to right. Look at the distortion on the right side in the original. Original floorDistorted Improved floorFixed

Credit to a 2019 Kaiser tweet for pointing out the problem.

It would be nice if https://github.com/LTCHIPS/rottexpr/pull/42 went in ahead of this. I did a hackier work around the same mingw-w64 problem for w_wad.c.

Calinou commented 2 years ago

I can confirm this PR works as expected:

image

zZeck commented 2 years ago

In hindsight, I should have made the comparison images on a level with straight lines in the floor texture. Thanks for vouching for the PR. Planning on doing anything else in ROTT?

Calinou commented 2 years ago

Planning on doing anything else in ROTT?

I don't have much in mind right now, but maybe I'll contribute QOL improvements in the future :slightly_smiling_face: