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. --- vertex.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vertex.c') diff --git a/vertex.c b/vertex.c index 970bbbc..92c6b0a 100644 --- a/vertex.c +++ b/vertex.c @@ -43,6 +43,16 @@ dupvertex(Vertex *v) return nv; } +void +swapvertex(Vertex *a, Vertex *b) +{ + Vertex t; + + t = *a; + *a = *b; + *b = t; +} + /* * linear attribute interpolation */ -- cgit v1.2.3