Interesting, that seems to be missing in the OptiX documentation.
That’s defined by the triangle winding. The default front face is counter-clockwise winding in a right-handed coordinate system (OpenGL), resp. clockwise in a left-handed coordinate system (DirectX).
The optixGetHitKind() result can be flipped per instance with: OPTIX_INSTANCE_FLAG_FLIP_TRIANGLE_FACING
[url]https://raytracing-docs.nvidia.com/optix7/api/html/group__optix__types.html#gadefef6077edef8bb8f4008d27d784745[/url]
There are three convenience functions over optixGetHitKind():
[url]https://raytracing-docs.nvidia.com/optix7/api/html/group__optix__device__api.html#ga39492a97a6301dd6eb51c48e020a54cd[/url]
For custom primitives you have 7 bits you can set as hit kind in optixReportIntersection().
[url]https://raytracing-docs.nvidia.com/optix7/api/html/group__optix__device__api.html#ga8ef53b8aca3f16a532142ee13f987c2a[/url]