mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-28 02:58:35 +02:00
~ | BVH optimizing again
This commit is contained in:
@ -66,7 +66,7 @@ hitInfo traceBVH(Ray ray)
|
||||
hit.t = 1e30;
|
||||
hit.obj_index = -1;
|
||||
|
||||
int stack[64];
|
||||
int stack[32];
|
||||
int stack_ptr = 0;
|
||||
stack[0] = 0;
|
||||
|
||||
@ -84,7 +84,7 @@ hitInfo traceBVH(Ray ray)
|
||||
GPUTriangle obj = triangles[node.first_primitive + i];
|
||||
|
||||
hitInfo temp_hit;
|
||||
if (intersectTriangle(ray, obj, temp_hit) && temp_hit.t > 0.0f && temp_hit.t < hit.t + 0.0001)
|
||||
if (intersectTriangle(ray, obj, temp_hit) && temp_hit.t < hit.t)
|
||||
{
|
||||
hit.t = temp_hit.t;
|
||||
hit.last_t = temp_hit.last_t;
|
||||
|
Reference in New Issue
Block a user