From 50f15bac90638da401d27229969dc502c75d1320 Mon Sep 17 00:00:00 2001 From: rodri Date: Fri, 2 Aug 2024 17:57:42 +0000 Subject: fix line interpolation during rasterization. vertex attributes were not being updated after clipping with their corresponding work rectangles, nor when reordering the points before rasterization, which caused serious artifacts. --- internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal.h') diff --git a/internal.h b/internal.h index f34776a..777ace8 100644 --- a/internal.h +++ b/internal.h @@ -45,6 +45,7 @@ void rmfbctl(Framebufctl*); /* vertex */ Vertex dupvertex(Vertex*); +void swapvertex(Vertex*, Vertex*); void lerpvertex(Vertex*, Vertex*, Vertex*, double); void berpvertex(Vertex*, Vertex*, Vertex*, Vertex*, Point3); void delvattrs(Vertex*); @@ -52,7 +53,7 @@ void fprintvattrs(int, Vertex*); /* clip */ int clipprimitive(Primitive*, Primitive*); -int rectclipline(Rectangle, Point*, Point*); +int rectclipline(Rectangle, Point*, Point*, Vertex*, Vertex*); /* util */ int min(int, int); -- cgit v1.2.3