RenderMan API  23.0
RixRNG::SampleCtx Struct Reference

#include <RixRNG.h>

Public Member Functions

SampleCtx NewDomain (Scramble scramble) const
 
SampleCtx NewDomainDistrib (Scramble scramble, unsigned newsampleid) const
 
SampleCtx NewDomainSplit (Scramble scramble, unsigned newnumsamples) const
 

Public Attributes

unsigned patternid
 
unsigned sampleid
 

Detailed Description

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.

Member Function Documentation

◆ NewDomain()

SampleCtx RixRNG::SampleCtx::NewDomain ( Scramble  scramble) 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') and inherited pattern id. The new sample id is inherited from this sampleCtx.

Definition at line 86 of file RixRNG.h.

◆ NewDomainDistrib()

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.

◆ NewDomainSplit()

SampleCtx RixRNG::SampleCtx::NewDomainSplit ( Scramble  scramble,
unsigned  newnumsamples 
) 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') and inherited pattern id, and a new number of samples. This form should be preferred where every visit will consume the same number of samples, and it is expected that all sibling visits will also always result in the drawing of a new domain - thus exploring the full space. Uses trajectory splitting. If newnumsamples is 1 this is the same as just NewDomain(scramble).

Definition at line 123 of file RixRNG.h.

Member Data Documentation

◆ patternid

unsigned RixRNG::SampleCtx::patternid

Definition at line 78 of file RixRNG.h.

◆ sampleid

unsigned RixRNG::SampleCtx::sampleid

Definition at line 79 of file RixRNG.h.


The documentation for this struct was generated from the following file: