From 5114d428dab8ce5a3a4c1aa0ce7c4e8fc5ddfc29 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Mon, 16 Mar 2020 09:57:01 +0900 Subject: [PATCH] Use the seed value in random value generation. I forgot to add this in. It wasn't noticable, since the QMC sequences did use the seed, and we probably don't ever get to the random values for 15+ light bounces. But it seems worth fixing anyway! --- src/renderer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer.rs b/src/renderer.rs index 3240e85..50aff11 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -712,7 +712,7 @@ fn get_sample(dimension: u32, i: u32, pixel_co: (u32, u32), seed: u32) -> f32 { _ => { // Random sampling. use crate::hash::hash_u32_to_f32; - hash_u32_to_f32(dimension ^ (i << 16), pixel_id) + hash_u32_to_f32(dimension ^ (i << 16), hash_u32(pixel_id, seed)) } } }