Skip to content
Snippets Groups Projects
Commit 18341426 authored by Thomas Müller's avatar Thomas Müller
Browse files

SDF: faster ray stabbing when OptiX is not found

parent 557d53a8
No related branches found
No related tags found
No related merge requests found
...@@ -428,7 +428,7 @@ public: ...@@ -428,7 +428,7 @@ public:
Vector3f d = fibonacci_dir<N_STAB_RAYS>(i, offset); Vector3f d = fibonacci_dir<N_STAB_RAYS>(i, offset);
// If any of the stab rays goes outside the mesh, the SDF is positive. // If any of the stab rays goes outside the mesh, the SDF is positive.
if (ray_intersect(point, -d, bvhnodes, triangles).first < 0 || ray_intersect(point, d, bvhnodes, triangles).first < 0) { if (ray_intersect(point, d, bvhnodes, triangles).first < 0) {
return distance; return distance;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment