GPUOpen-LibrariesAndSDKs / RadeonRays_SDK

Radeon Rays is ray intersection acceleration library for hardware and software multiplatforms using CPU and GPU
MIT License
1.07k stars 192 forks source link

Intersect a ray with triangulate using gpu #203

Open jieeeeeeeeeee opened 5 years ago

jieeeeeeeeeee commented 5 years ago

Hello, i am a student interesting in ray intersection. I desires to know how can i intersect a ray with triangulate using gpu. Is there any code abort ray intersection in this project?

Agorath commented 5 years ago

Hi, the code you are looking for is in the OpenCL kernels (.cl files) in the following subdirectory: RadeonRays_SDK/RadeonRays/src/kernels/CL/%.cl You will find the code for the ray triangle intersection in common.cl in the function: INLINE float fast_intersect_triangle(ray r, float3 v1, float3 v2, float3 v3, float tmax) The other files (intersect%.cl) contain the code used for the traversal of the different bounding volume hierarchy variants supported by RadeonRays. One word of warning though: At the moment it looks like AMD likely abandoned this project. So you probably won't get any "official" responses/support from AMD.

jieeeeeeeeeee commented 5 years ago

I appreciate your help. Thank you so much.