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:
parent
04a5dbff43
commit
e3152e6f9c
|
@ -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.
|
||||||
|
|
|
@ -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();
|
||||||
|
|
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-0.1024.txt
Normal file
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-0.1024.txt
Normal file
File diff suppressed because it is too large
Load Diff
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-2.1024.txt
Normal file
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-2.1024.txt
Normal file
File diff suppressed because it is too large
Load Diff
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-3.1024.txt
Normal file
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-3.1024.txt
Normal file
File diff suppressed because it is too large
Load Diff
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-4.1024.txt
Normal file
1024
sub_crates/sobol/direction_numbers/joe-kuo-other-4.1024.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user