+ | texture

This commit is contained in:
RedShip
2025-01-28 19:19:46 +01:00
parent ff9ab9251f
commit 8466e672f6
10 changed files with 43 additions and 17 deletions

View File

@ -80,6 +80,8 @@ hitInfo traceBVH(Ray ray, GPUBvhData bvh_data)
hitInfo temp_hit;
if (intersectTriangle(ray, obj, temp_hit) && temp_hit.t < hit.t)
{
hit.u = temp_hit.u;
hit.v = temp_hit.v;
hit.t = temp_hit.t;
hit.last_t = temp_hit.last_t;
hit.obj_index = bvh_data.triangle_start_index + node.index + i;