summaryrefslogtreecommitdiff
path: root/vertex.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-06-10 15:59:57 +0000
committerrodri <rgl@antares-labs.eu>2024-06-10 15:59:57 +0000
commit213c3a4e99c3085ee89fda550897213abbc888ad (patch)
tree6dead68a5f64ca4d23285ab3dd13a7a36e4fea92 /vertex.c
parent239a319b41474a35e4c9c4b7c6ae3c6e0b0b7185 (diff)
downloadlibgraphics-213c3a4e99c3085ee89fda550897213abbc888ad.tar.gz
libgraphics-213c3a4e99c3085ee89fda550897213abbc888ad.tar.bz2
libgraphics-213c3a4e99c3085ee89fda550897213abbc888ad.zip
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.
Diffstat (limited to 'vertex.c')
-rw-r--r--vertex.c5
1 files changed, 4 insertions, 1 deletions
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)