~ | Better camera managment

This commit is contained in:
TheRedShip
2025-01-09 11:48:32 +01:00
parent dbdd08f3ec
commit e474e451e6
11 changed files with 144 additions and 50 deletions

View File

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