Fix low-mua fluence deposition in MMC raytracers#129
Conversation
|
@lpattelli, thanks for the patch I reviewed your changes, I have a few questions:
it seems to be similar to @epini's initially patch, but this approach was found to cause regression and as fixed later. it also uses an unnamed threshold constant 1e-3f - it should preferrably be a macro, if introducing this extra threshold is entirely necessary.
|
ce46d76 to
c2e1123
Compare
c2e1123 to
d9bc2fe
Compare
|
Thanks for catching this. Indeed I forgot how the discussion evolved after our initial patch, and that it needed subsequent fixes. fluence = (mua < EPS) ? w0 * pathlength : (w0 - w1) / muaSo the extra I also tried to replicate mcx's use of For the CPU backend: the reason the diff is slightly larger is that the existing code uses the same variable, |
Dear Prof. Fang,
I'm opening this PR in an attempt to mirror the logic for the low-mua fix that was introduced in mcx with fangq/mcx#164, fixing fluence deposition in the low-absorption limit.
In mmc, this seems to have more ramifications than the quick mcx fix.
If you have any feedback, I'm happy to iterate.