Skip to content

Commit

Permalink
Fixed corner case in embreeaccel
Browse files Browse the repository at this point in the history
  • Loading branch information
acasta69 committed Sep 10, 2023
1 parent 2f35684 commit a061ca9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/luxrays/accelerators/embreeaccel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ bool EmbreeAccel::Intersect(const Ray *ray, RayHit *hit) const {

RTCRayHit embreeRayHit;

if (isnan(ray->o.x) || isnan(ray->o.y) || isnan(ray->o.z) || isnan(ray->d.x) || isnan(ray->d.y) || isnan(ray->d.z))
return false;

embreeRayHit.ray.org_x = ray->o.x;
embreeRayHit.ray.org_y = ray->o.y;
embreeRayHit.ray.org_z = ray->o.z;
Expand Down

0 comments on commit a061ca9

Please sign in to comment.