mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-28 02:58:35 +02:00
+ | Texture better coede
This commit is contained in:
@ -91,8 +91,8 @@ bool intersectTriangle(Ray ray, GPUTriangle obj, out hitInfo hit)
|
||||
hit.v = v;
|
||||
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));
|
||||
// hit.normal = vec3(u, v, 1 - (u + v)); //texture mapping
|
||||
|
||||
return (valid);
|
||||
}
|
||||
|
Reference in New Issue
Block a user