示例#1
0
 virtual float next1D(SampleBlock block) override final
 {
     if (_blockOffset[block] > blockMaximum(block))
         FAIL("_blockOffset[%s] (%d) > %d", block, _blockOffset[block], blockMaximum(block));
     int dimension = _pathOffset + block + _blockOffset[block];
     _blockOffset[block]++;
     if (dimension >= 1024)
         return _supplementalSampler.next1D();
     return BitManip::normalizedUint(sobol::sample(permutedIndex(), dimension, _scramble));
 }
示例#2
0
 virtual Vec2f next2D() override final
 {
     float a = _sampler.next1D();
     float b = _sampler.next1D();
     return Vec2f(a, b);
 }
示例#3
0
 virtual float next1D() override final
 {
     return _sampler.next1D();
 }
示例#4
0
 virtual int nextDiscrete(int numChoices) override final
 {
     return int(_sampler.next1D()*numChoices);
 }
示例#5
0
 virtual bool nextBoolean(float pTrue) override final
 {
     return _sampler.next1D() < pTrue;
 }
示例#6
0
 virtual int nextDiscrete(SampleBlock /*block*/, int numChoices) override final
 {
     return int(_supplementalSampler.next1D()*numChoices);
 }
示例#7
0
 virtual bool nextBoolean(SampleBlock /*block*/, float pTrue) override final
 {
     return _supplementalSampler.next1D() < pTrue;
 }