Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPU(s)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
288 Discussions

Embree 3.8.0 change with sphere intersections

AndrewC
New Contributor III
1,563 Views

From the release notes ..."For sphere geometries the intersection filter gets now invoked for front and back hit."

This is slightly annoying as now I get two calls to the intersectFilter for each sphere. I would like to "ignore" the second hit ( I just care that the ray hit the sphere). I process each hit as it happens, so I have no record of the previous hit. Any suggestions on how to ignore the back hit? Although the change did not break my algorithm, it doubles the hit-processing time.

0 Kudos
1 Reply
AndrewC
New Contributor III
1,555 Views

I found a simple solution. In the intersection routine find the "t" where the ray is closest to the center of the sphere. Compare this to the "tFar" of the ray in the the intersection filter. if tFar>t then it is the "back" intersection.

0 Kudos
Reply