7#include <Common/assertion.h>
8#include <Common/primitive_type.h>
27 real* out_survivalProbability)
const;
33 real*
const out_survivalProbability)
const
35 PH_ASSERT(out_survivalProbability);
40 const real rrSpin = sampleFlow.
flow1D();
43 if(rrSpin < rrSurvivalRate)
45 PH_ASSERT(0.0_r < rrSurvivalRate && rrSurvivalRate <= 1.0_r);
47 *out_survivalProbability = rrSurvivalRate;
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
real flow1D()
Makes a 1-D sample by consuming the next dimension.
Definition SampleFlow.h:105
Russian roulette random termination scheme.
Definition RussianRoulette.h:16
bool surviveOnLuminance(const math::Spectrum &s, SampleFlow &sampleFlow, real *out_survivalProbability) const
Definition RussianRoulette.h:30
T relativeLuminance(EColorUsage usage=EColorUsage::EMR) const
Definition TSpectrumBase.ipp:124
Definition TTristimulusSpectrum.h:11
Miscellaneous math utilities.
Light transport algorithms.
Definition enums.h:6
T safe_clamp(const T value, const T lowerBound, const T upperBound)
Clamps a value to [lowerBound, upperBound], fallback to lowerBound. If a floating-point value is non-...
Definition math.h:98