Add alternative Sobol direction numbers to the repo.

Also switching to one of the alternates, as it seems to give
better results than the one I was using before.
This commit is contained in:
Nathan Vegdahl 2020-03-17 16:49:19 +09:00
parent 04a5dbff43
commit e3152e6f9c
6 changed files with 4098 additions and 7 deletions

View File

@ -709,12 +709,7 @@ fn get_sample(dimension: u32, i: u32, pixel_co: (u32, u32), seed: u32) -> f32 {
n if (n - 1) < sobol::MAX_DIMENSION as u32 => { n if (n - 1) < sobol::MAX_DIMENSION as u32 => {
let dim = n - 1; let dim = n - 1;
// Sobol sampling. // Sobol sampling.
// We skip the first three dimensions here because it gives better sobol::sample_owen(dim, i, hash_u32(dim, scramble))
// results on many scenes for some reason. This is likely worth
// investigating in the future, as it may indicate poor sampling
// elsewhere in the rendering pipeline (and skipping the first
// two dimensions may just mask it).
sobol::sample_owen(dim + 3, i, hash_u32(dim, scramble))
} }
_ => { _ => {
// Random sampling. // Random sampling.

View File

@ -7,7 +7,7 @@ use std::{env, fs::File, io::Write, path::Path};
const NUM_DIMENSIONS: usize = 256; const NUM_DIMENSIONS: usize = 256;
/// What file to generate the numbers from. /// What file to generate the numbers from.
const DIRECTION_NUMBERS_TEXT: &str = include_str!("direction_numbers/new-joe-kuo-5.1024.txt"); const DIRECTION_NUMBERS_TEXT: &str = include_str!("direction_numbers/joe-kuo-other-3.1024.txt");
fn main() { fn main() {
let out_dir = env::var("OUT_DIR").unwrap(); let out_dir = env::var("OUT_DIR").unwrap();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff