I’m trying to create a program that uses what would normally constitute rendering rays (back propagation from the camera) and shadow rays.
The rendering rays use the closest hit program while the shadow rays are any hit program.
I found that the closest hit program receives the ray data in world coordinates while the any hit program receives it in object coordinates. Somehow it seems that rtTrace is similarly affected but I’ve not managed to completely figure out how it works. I do see that the any hit program definitely doesn’t get called properly when world coordinates are used for rtTrace.
I am using optic 3.8 and OptixMesh to load the object from an obj file so I’m not sure what code is used for the ray intersection and it seems that OptixMesh is pretty new so may affect the problem.
Anyone else seen the problem and can shed some light?
Is this a bug or a feature and is it documented somewhere how to deal with it?