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

RTCFilterFunctionNArguments and RTCIntersectFunctionNArguments memory layout

manoula
Beginner
1,280 Views

Hi, I have a question concerning RTCFilterFunctionNArguments and RTCIntersectFunctionNArguments

For RTCRayHitN*, I can get rayn or hitn using 

RTCRayN* RTCRayHitN_RayN(RTCRayHitN* rayhit, unsigned int N) { return (RTCRayN*)&((float*)rayhit)[0*N]; }
RTCHitN* RTCRayHitN_HitN(RTCRayHitN* rayhit, unsigned int N) { return (RTCHitN*)&((float*)rayhit)[12*N]; }
 
Will it give me the same result if I apply (RTCHitN*)&((float*)ray)[12*N]  to RTCRayN* in RTCFilterFunctionNArguments?

 

struct RTCFilterFunctionNArguments
{
  int* valid;
  void* geometryUserPtr;
  const struct RTCIntersectContext* context;
  struct RTCRayN* ray;
  struct RTCHitN* hit;
  unsigned int N;
};

 

struct RTCIntersectFunctionNArguments
{
  int* valid;
  void* geometryUserPtr;
  unsigned int primID;
  struct RTCIntersectContext* context;
  struct RTCRayHitN* rayhit;
  unsigned int N;
  unsigned int geomID;
};

 

0 Kudos
2 Replies
SvenW_Intel
Moderator
1,252 Views

No, you have to use the provided hit pointer provided in the RTCFilterFunctionNArguments.

0 Kudos
manoula
Beginner
1,240 Views
0 Kudos
Reply