Re: Quasirandom sampler
Posted: Mon Mar 11, 2019 12:10 am
How do I edit the OpenCL code? I see that there are some .cl files, but not for all the things that exist in the C++ code
Show your work, get help, participate in development
http://forums.luxcorerender.org/
I've been thinking and I guess it is because each pixel should be sampled according to a separate Sobol sequence. When the pass is increased globally and some pixels were skipped, the distribution for those becomes compromised and worsens the sampling quality.alpistinho wrote: ↑Sun Mar 10, 2019 10:37 pm Why is it bad for sampling that some pixels are skipped?
Yes, that it is what I was trying to say in my previous post.alpistinho wrote: ↑Mon Mar 11, 2019 9:48 pmI've been thinking and I guess it is because each pixel should be sampled according to a separate Sobol sequence. When the pass is increased globally and some pixels were skipped, the distribution for those becomes compromised and worsens the sampling quality.alpistinho wrote: ↑Sun Mar 10, 2019 10:37 pm Why is it bad for sampling that some pixels are skipped?
Can't I use the SAMPLECOUNT channel for that? It is stored anyways and counts how many passes each pixel received, no?
Code: Select all
if (rndGen->floatValue() < adaptiveStrength) {
// Skip this pixel and try the next one
continue;
} else {
pixelPass = *(film->channel_SAMPLECOUNT->GetPixel(pixelX, pixelY));
}
...
sample0 = pixelX + sobolSequence.GetSample(pixelPass, 0);
sample1 = pixelY + sobolSequence.GetSample(pixelPass, 1);
There would be a problem with SAMPLECOUNT and hybrid rendering: it is the sum of CPU and GPU work while CPU and GPU threads uses 2 different samplers. The pass count buffer must be part of the SobolSharedData object and updated atomically (i.e. in a thread safe way). Something you can not do across both CPU and GPU.alpistinho wrote: ↑Thu Mar 14, 2019 12:45 am Can't I use the SAMPLECOUNT channel for that? It is stored anyways and counts how many passes each pixel received, no?