From 213c3a4e99c3085ee89fda550897213abbc888ad Mon Sep 17 00:00:00 2001 From: rodri Date: Mon, 10 Jun 2024 15:59:57 +0000 Subject: add spotlight params and a light color shading routine. other things. among these other things are clamping the color channels to [0,1] internally, and adding a modulation function for mixing colors/points. --- vertex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vertex.c') diff --git a/vertex.c b/vertex.c index bc7759f..204c6fc 100644 --- a/vertex.c +++ b/vertex.c @@ -43,6 +43,9 @@ dupvertex(Vertex *v) return nv; } +/* + * linear attribute interpolation + */ void lerpvertex(Vertex *v, Vertex *v0, Vertex *v1, double t) { @@ -68,7 +71,7 @@ lerpvertex(Vertex *v, Vertex *v0, Vertex *v1, double t) } /* - * perspective-correct barycentric attribute interpolation + * barycentric attribute interpolation */ void berpvertex(Vertex *v, Vertex *v0, Vertex *v1, Vertex *v2, Point3 bc) -- cgit v1.2.3