Horizontal wall clipping

I was wondering how you would go about coding this horizontal wall clipping
this is from https://fabiensanglard.net/gebbdoom.pdf on page 212.
having it so it only draws on the screen where it hasn’t already been drawn but only taking into account the x-axis as shown in the picture.

1 Like