mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
Increase sampling rate for tests when NSpectrumSamples < 4.
Fixes #321.
This commit is contained in:
parent
982cd114e0
commit
6da64631f9
2 changed files with 21 additions and 14 deletions
|
|
@ -681,6 +681,8 @@ TEST(Hair, WhiteFurnace) {
|
|||
// More samples for the smooth case, since we're sampling blindly.
|
||||
int count = (beta_m < .5 || beta_n < .5) ? 100000 : 20000;
|
||||
|
||||
if (NSpectrumSamples < 4) count *= 4;
|
||||
|
||||
for (int i = 0; i < count; ++i) {
|
||||
SampledWavelengths lambda =
|
||||
SampledWavelengths::SampleVisible(RadicalInverse(0, i));
|
||||
|
|
|
|||
|
|
@ -241,26 +241,31 @@ std::vector<std::pair<Sampler, std::string>> GetSamplers(const Point2i &resoluti
|
|||
if (!samplers.empty())
|
||||
return samplers;
|
||||
|
||||
samplers.push_back(std::make_pair(new HaltonSampler(256, resolution), "Halton 256"));
|
||||
int sqrtSpp = 16;
|
||||
if (NSpectrumSamples < 4)
|
||||
sqrtSpp *= 2;
|
||||
int spp = sqrtSpp * sqrtSpp;
|
||||
|
||||
samplers.push_back(std::make_pair(new HaltonSampler(spp, resolution), "Halton"));
|
||||
samplers.push_back(
|
||||
std::make_pair(new PaddedSobolSampler(256, RandomizeStrategy::PermuteDigits),
|
||||
"Padded Sobol 256"));
|
||||
std::make_pair(new PaddedSobolSampler(spp, RandomizeStrategy::PermuteDigits),
|
||||
"Padded Sobolspp"));
|
||||
samplers.push_back(std::make_pair(
|
||||
new ZSobolSampler(256, Point2i(16, 16), RandomizeStrategy::PermuteDigits),
|
||||
"Z Sobol 256"));
|
||||
new ZSobolSampler(spp, Point2i(16, 16), RandomizeStrategy::PermuteDigits),
|
||||
"Z Sobol"));
|
||||
samplers.push_back(
|
||||
std::make_pair(new SobolSampler(256, resolution, RandomizeStrategy::None),
|
||||
"Sobol 256 Not Randomized"));
|
||||
std::make_pair(new SobolSampler(spp, resolution, RandomizeStrategy::None),
|
||||
"Sobol Not Randomized"));
|
||||
samplers.push_back(std::make_pair(
|
||||
new SobolSampler(256, resolution, RandomizeStrategy::PermuteDigits),
|
||||
"Sobol 256 XOR Scramble"));
|
||||
new SobolSampler(spp, resolution, RandomizeStrategy::PermuteDigits),
|
||||
"Sobol XOR Scramble"));
|
||||
samplers.push_back(
|
||||
std::make_pair(new SobolSampler(256, resolution, RandomizeStrategy::Owen),
|
||||
"Sobol 256 Owen Scramble"));
|
||||
samplers.push_back(std::make_pair(new IndependentSampler(256), "Independent 256"));
|
||||
std::make_pair(new SobolSampler(spp, resolution, RandomizeStrategy::Owen),
|
||||
"Sobol Owen Scramble"));
|
||||
samplers.push_back(std::make_pair(new IndependentSampler(spp), "Independent"));
|
||||
samplers.push_back(
|
||||
std::make_pair(new StratifiedSampler(16, 16, true), "Stratified 16x16"));
|
||||
samplers.push_back(std::make_pair(new PMJ02BNSampler(256), "PMJ02bn 256"));
|
||||
std::make_pair(new StratifiedSampler(sqrtSpp,sqrtSpp, true), "Stratified"));
|
||||
samplers.push_back(std::make_pair(new PMJ02BNSampler(spp), "PMJ02bn"));
|
||||
|
||||
return samplers;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue