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)); }
virtual Vec2f next2D() override final { float a = _sampler.next1D(); float b = _sampler.next1D(); return Vec2f(a, b); }
virtual float next1D() override final { return _sampler.next1D(); }
virtual int nextDiscrete(int numChoices) override final { return int(_sampler.next1D()*numChoices); }
virtual bool nextBoolean(float pTrue) override final { return _sampler.next1D() < pTrue; }
virtual int nextDiscrete(SampleBlock /*block*/, int numChoices) override final { return int(_supplementalSampler.next1D()*numChoices); }
virtual bool nextBoolean(SampleBlock /*block*/, float pTrue) override final { return _supplementalSampler.next1D() < pTrue; }