+ | Texture parsing on obj

This commit is contained in:
TheRedShip
2025-01-28 12:20:09 +01:00
parent e9c77cfdd4
commit 7b81995724
14 changed files with 2940 additions and 1195 deletions

View File

@ -89,6 +89,7 @@ bool intersectTriangle(Ray ray, GPUTriangle obj, out hitInfo hit)
hit.t = t;
hit.position = ray.origin + ray.direction * t;
// hit.normal = vec3(u, v, 1 - (u + v)); //texture mapping
hit.normal = obj.normal * sign(-dot(ray.direction, obj.normal));
return (valid);