Not sure if this is the best way to handle it. This approach assumes that there's a 1:1 relationship between the shading position and the origin of the new ray, but that can't really be assumed.
Code looks good to me now.
In terms of name, I like "Ray Portal", that seems distinct enough from "Light Portal" and describes what is happening quite nicely.
Updates:
- Rebased to latest
main
- Fixed handling of TIR on the bottom interface (thin film to bulk medium)
- Fixed handling of backfacing IOR
I'm not aware of any remaining issues, so I…
Good point about that sentence, thanks - dropping caches might indeed be worth it to reduce peak mem usage. I've updated the PR and commit message.
If it's too much trouble to backport, let's just not backport this fix then.
Fine with me, I guess if the bug was open for 4 years it's not such a common use case to begin with...
@Sergey Good point about the tagging - changing it to use DEG_get_original_object
and tag the original object fixes #73221, but not the other two. On the other hand, !120543 fixes all three even…