Use better seeding for slow version of Owen scramble as well.

This commit is contained in:
Nathan Vegdahl 2020-04-17 13:18:37 +09:00
parent b74a58cb72
commit f36b71184a

View File

@ -63,7 +63,7 @@ pub fn sample_owen(dimension: u32, index: u32, scramble: u32) -> f32 {
#[inline]
pub fn sample_owen_slow(dimension: u32, index: u32, scramble: u32) -> f32 {
let mut n = sobol_u32(dimension, index);
n ^= scramble;
n = n.reverse_bits().wrapping_add(scramble).reverse_bits();
for i in 0..16 {
let mask = (1 << (31 - i)) - 1;
let hash = {