Bump mapping, spec mapping often be included in many scenes’ materials. How can I get the triangle information of the current hit point in the close hit function to calculate the tangent and Btangent directions? I load the mesh by OptixMesh.
OptiXMesh sponza_mesh;
sponza_mesh.context = context;
loadMesh("D:\\MyDocument\\BackUP\\sponza\\sponza.obj", sponza_mesh);
for (size_t i = 0; i < sponza_mesh.geom_instance->getMaterialCount(); ++i) {
sponza_mesh.geom_instance->setMaterial(static_cast<int>(i), sponza_mat[i]);
}
My optix version is Optix 6.0, win10, P4000 graphics card.