예제 #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;
 }