Balance heuristic for MIS — weights a sample from strategy A by p_a / (p_a + p_b). Standard in PBRT / Eric Veach's thesis.
(pdf_this: f32, pdf_other: f32)
| 1766 | /// Balance heuristic for MIS — weights a sample from strategy A by |
| 1767 | /// p_a / (p_a + p_b). Standard in PBRT / Eric Veach's thesis. |
| 1768 | fn mis_balance(pdf_this: f32, pdf_other: f32) -> f32 { |
| 1769 | pdf_this / (pdf_this + pdf_other + 1e-6) |
| 1770 | } |
| 1771 | |
| 1772 | fn trace_path( |
| 1773 | scenario: &Scenario, |