🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Efficient GPU Ray Intersection

Started by
1 comment, last by JoeJ 4 years, 3 months ago

Would it be better to set the camera direction to the ray direction and position then do the typical matrix operations on geometry and then check to see if the 2D geometry covers the center of the screen than the typical intersection tests for the GPU? I guess you could do a whole triangle at a time too, just gotta check however many pixels the triangle covers from around the center of the screen.

Advertisement

OpenGLs mouse picking worked this way: Set up projection matrix to mouse pointer position, render a tiny framebuffer and check which triangle is visible.
But ofc. this is not efficient at all, because it loops over all triangles, culls them, rasterizes them.

Not sure what you mean with ‘typical intersection tests’ on GPU, but if it's using a acceleration structure like BVH to speed things up, that's much faster.
With AMD adopting to HW RT soon, i think we don't have anymore reason to implement this ourselves. You would just use DXR, Vulkan, or the interfaces of U-engines around that to get fast RT.

This topic is closed to new replies.

Advertisement