Open Raildex opened 9 months ago
In fast mode (default) it can happen that u/v coordinates are slightly out of the triangle. You can just interpolate vertex data as usual using these uv's. If this is an issue, you can also enable robust mode (RTC_SCENE_FLAG_ROBUST) which will not have this issue.
My Scene is set to RTC_SCENE_FLAG_ROBUST
and I receive illegal barycentric coords.
Within an Occluded Filter Function I use
auto u = RTCHitN_u(args->hit, args->N, i);
auto v = RTCHitN_v(args->hit, args->N, i);
if (u < 0 || u > 1 || v < 0 || v > 1) {
throw Exception("Illegal Barycentric Coordinate!");
}
Please also reproduce the issue in the minimal tutorial. Is u/v smaller 0 or larger than 1?
In my
rtcSetGeometryIntersectFilterFunction
for a triangle mesh I receive a negative barycentric coordinate. Since the intersection is outside of the triangle, what am I supposed to do with it?