Does OptiX support double precision rays (origin, direction, etc.)? If not, can it be adapted to do so?

I am trying to figure out if I can use OptiX as the basis for a physics (i.e. not graphical) ray tracer which requires double precision.

Thanks,

C

Interesting question. When I started using OptiX it was definitely not possible (or at least I could not figure out how to do it). I bypassed the problem by defining a double precision origin and direction in the per ray data. As I did not use any of the built in acceleration structures, I could do all the tracing on this per ray data. I did never set the origin and direction in optix ray structure.

If you’re interested you can check out the code I produced under https://bitbucket.org/itom/macrosim/ . If it suites your needs you’re welcome to use it.

regards

florian

Thanks superbetonio. I actually need the acceleration structures since I will have up to 100 million rays and/or one million “instances” per run. And I need the run done in about 1.5 seconds.

Hmm, I see. You could still do the intersection and hit calculations based on double precision variables in the per ray data structures. You could then try to keep the built in ray.direction and ray.origin up to date with the double precision values. This could work if it is sufficient to do your acceleration structure calculations in single precision.

That might work. I will have to do some test to see how far off course the rays go when using single precision.