SampleCtx identifies a sample domain (an index into an arbitrary scheme of sample points). It represents a point of consumption for sample points – e.g. picking a direction and picking a position might be two distinct domains which both want independent streams of decorrelated sample points. A SampleCtx domain may be used to pick a sample point or to derive a new SampleCtx domain.
Definition at line 76 of file RixRNG.h.
SampleCtx RixRNG::SampleCtx::NewDomainDistrib |
( |
Scramble |
scramble, |
|
|
unsigned |
newsampleid |
|
) |
| const |
|
inline |
Return a new SampleCtx domain based on this one, but with a scrambled pattern id based on the 'scramble' parameter (a bit pattern characterizing a sampling domain – e.g. a number based on brdf 'lobe'), the inherited pattern id, and the sample id. Including the sample id in the creating of a new pattern id ensures that there is a new, independent sample distribution for every iteration. This form should be preferred where the new domain's expected number of samples differs from that of the parent and repeated visits may nor may not have the same sample count or may consume differing numbers of samples: distribution sampling.
Definition at line 105 of file RixRNG.h.