Marzac/le3d

w representation and AMMX asm rasterizer

Marzac opened this issue · 2 comments

Hi @m0ppers.

I committed a new version of the engine where the W coordinates (1 / z) are now normalized.
Now the Ws range from -1.0 to 0.0 (near clipping plane to infinity) disregarding the near clipping plane absolute distance.

To benefit from the now possible gain of precision in fixed point calculations, I updated the integer rasterizer so that the Ws representation is now:

w = 1e30 / z

this representation used to be (to have some margins / shit hack):

w = 1e28 / z

So that it works as it should on the Amiga target, please update your shifts in your AMMX code.
Thx, Fred

I am currently off (well I am away but working) for 2 weeks so no access to my amiga right now. Will do so once I am back so I can test it :)

No problem.
I wrote this down here so you don't have to 'investigate'. It can be quite laborious to guess what has changed here and I did not want to update the AMMX with no means to test the result.