From 1a0ba11b49d36748e91021419305cd30d0ac43ac Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Mon, 18 Oct 2021 18:36:09 +0200 Subject: [PATCH] Ray-triangle-intersection: Return u and v --- vector.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector.lua b/vector.lua index 0633607..d611a23 100644 --- a/vector.lua +++ b/vector.lua @@ -228,7 +228,7 @@ function ray_triangle_intersection(origin, direction, triangle) end local pos_on_line = f * dot(edge_2, q) if pos_on_line >= 0 then - return pos_on_line + return pos_on_line, u, v end end