From dc597a2c65278119b7d11f83218b860c0c5da051 Mon Sep 17 00:00:00 2001 From: rodri Date: Tue, 4 Jun 2024 18:11:11 +0000 Subject: add a tangent parameter for normal mapping, and a world2model xform. --- xform.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xform.c') diff --git a/xform.c b/xform.c index b6e4397..4351113 100644 --- a/xform.c +++ b/xform.c @@ -139,6 +139,12 @@ viewport2world(Camera *c, Point3 p) return vcs2world(c, viewport2vcs(c, p)); } +Point3 +world2model(Entity *e, Point3 p) +{ + return rframexform3(p, *e); +} + void perspective(Matrix3 m, double fovy, double a, double n, double f) { -- cgit v1.2.3