Optix 8.0 Hit geom_normal

I was wondering how exactly the Optix 8 hit.geom_normal output from ray tracing is calculated. The below screenshot is the format of a ray tracing hit output after the program is run:

image

I was assuming the geom_normal value is the normal of the triangle in the mesh in which the ray intersected with. Something like the picture below:

image

@dhart DO you know if this is how the hit geom_normals are calculated?

Hi @alex.chisholm777,
I’m assuming your question is about a user’s OptiX program e.g. closest-hit and the struct comes from the optixRaycasting SDK sample. I would compute the normal counter-clockwise (it’s the more “mathematical” and OpenGL way, let’s say). So, for front-facing triangles I would do cross product (p2-p1) x (p3-p1).