Open Tradias opened 3 months ago
You are right, filter functions are newer called for user defined geometries automatically. You either have to add some rtcInvokeIntersectFilterFromGeometry call to invoke the filter function stored inside the geometry by hand, or pass the function set inside the RTCIntersectArguments manually through the context and call it.
I am doing doing the latter, but it took me a while to figure out because the documentation confused me and does not mention the latter approach to my knowledge.
Given a user-defined geometry (
RTC_GEOMETRY_TYPE_USER
) added to a scene withRTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS
then the following code:never invokes
some_filter
even though the documentation says that:Even enabling
rtcSetGeometryEnableFilterFunctionFromArguments
has no effect.This issue describes a workaround https://github.com/embree/embree/issues/441 but it would be nice to either change the documentation or change the behavior.
embree version 4.3.0