+ | Small tweaks

This commit is contained in:
TheRedShip
2025-01-09 00:03:33 +01:00
parent ff3af20e13
commit dbdd08f3ec
4 changed files with 24 additions and 20 deletions

View File

@ -115,8 +115,7 @@ bool intersectTriangle(Ray ray, GPUObject obj, out hitInfo hit)
bool intersectCube(Ray ray, GPUObject obj, out hitInfo hit)
{
vec3 obj_size = obj.vertex1;
vec3 halfSize = obj_size * 0.5;
vec3 halfSize = obj.cube_size() * 0.5;
vec3 rayOriginLocal = ray.origin - obj.position;
vec3 invDir = 1.0 / ray.direction;