JNechaevsky / international-doom

Small, functional and simple source ports, created with help, efforts and bits of code from people around the world.
https://jnechaevsky.github.io/inter-doom/
GNU General Public License v2.0
30 stars 2 forks source link

Fix sprite clipping at the edges of the screen in 32:9 ratio #143

Closed JNechaevsky closed 4 months ago

JNechaevsky commented 5 months ago

@ceski-1, something like this, for better view. I made couple of experiments, and in the end, such correction is needed even for 90 FOV (vid_fov >= 90) to prevent disappearing edge pixels of huge sprites like Spider Mastermind.

Still, looks likes even vanilla <<2 isn't optimal, as acording to simple printf("."); sprite may still run through projection code even if it's totally out of screen, but fortunately, it's still get reject by return's few lines of code below. How to make it more precise? Really no idea.

I've also checked framerate and amount of rendered vissprites at Camatose - looks likes there is no difference at all.

A testing map I was using: fovclip.zip

ceski-1 commented 4 months ago

I made some comments here: https://github.com/JNechaevsky/international-doom/commit/f406fb21e9ade46f0214a94de462547cfa49e7b3#r143740777

I think I'm close to a good solution, I just need to sit down and work it out when I'm free.

JNechaevsky commented 4 months ago

No longer needed because of better implementation, thanks @ceski-1!