summaryrefslogtreecommitdiffstats
path: root/libdimension/triangle.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-07-26 09:20:06 -0600
committerTavian Barnes <tavianator@gmail.com>2011-07-26 09:21:23 -0600
commit5f8ce1e256462a9addbe318966a70a4bc6399bad (patch)
tree148cc13bb63691d056d82424435df5347d809331 /libdimension/triangle.c
parente683539695c720e559139ffd58e1786fbb1ea06c (diff)
downloaddimension-5f8ce1e256462a9addbe318966a70a4bc6399bad.tar.xz
Support multiple texture assignment properly.
Diffstat (limited to 'libdimension/triangle.c')
-rw-r--r--libdimension/triangle.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libdimension/triangle.c b/libdimension/triangle.c
index bd54e1a..72cbce3 100644
--- a/libdimension/triangle.c
+++ b/libdimension/triangle.c
@@ -42,11 +42,8 @@ dmnsn_triangle_intersection_fn(const dmnsn_object *triangle, dmnsn_line l,
double u = -dmnsn_vector_dot(l.n, dmnsn_vector_cross(ax0, payload->ac))/den;
double v = -dmnsn_vector_dot(l.n, dmnsn_vector_cross(payload->ab, ax0))/den;
if (t >= 0.0 && u >= 0.0 && v >= 0.0 && u + v <= 1.0) {
- intersection->ray = l;
- intersection->t = t;
- intersection->normal = payload->normal;
- intersection->texture = triangle->texture;
- intersection->interior = triangle->interior;
+ intersection->t = t;
+ intersection->normal = payload->normal;
return true;
}