Improvement for sampling at low sample counts.
This commit is contained in:
parent
c4e1bedd43
commit
b74a58cb72
|
@ -701,7 +701,9 @@ fn get_sample(dimension: u32, i: u32, pixel_co: (u32, u32), seed: u32) -> f32 {
|
||||||
match dimension {
|
match dimension {
|
||||||
d if d < sobol::MAX_DIMENSION as u32 => {
|
d if d < sobol::MAX_DIMENSION as u32 => {
|
||||||
// Sobol sampling.
|
// Sobol sampling.
|
||||||
sobol::sample_owen(d, i, hash_u32(d, scramble))
|
// We skip the first 4 samples, because that mitigates some poor
|
||||||
|
// sampling at low sample counts like 16.
|
||||||
|
sobol::sample_owen(d, i + 4, hash_u32(d, scramble))
|
||||||
}
|
}
|
||||||
d => {
|
d => {
|
||||||
// Random sampling.
|
// Random sampling.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user