Hi All !
This is a test of the polygon clipping algorithm (translated from cpp).
Don't look so amazing, but is used for more complex thing at subpixel level (that I stil don't understand, I have to say :biggrin:)
In white is polygon to clip, in yellow the clipper window, and in blue or red are clipped polygons:
; Show imputs
invoke Poligono, addr poly_points1, poly_size1, 0FFBBBBBBh
invoke Poligono, addr clipper_points1, clipper_size1, 0FF00BBBBh
; Calling the clipping function
invoke SuthHodgClip, addr poly_points1, addr poly_size1, addr clipper_points1, clipper_size1
; Show result
invoke Poligono, addr poly_points1, poly_size1, 0FF0000FFh
Regards, HSE.
nice :thumbsup:
could also be used for frustrum culling?,clipping with x-z romb shape,reduces also too far/too near polys
Quote from: daydreamer on June 21, 2021, 10:47:19 PM
could also be used for frustrum culling?,clipping with x-z romb shape,reduces also too far/too near polys
:thumbsup: This algorithm is included in more complex algorithms with z.