From 6397f232571e626ef312b2b39ba01e28ff1e6f5b Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Mon, 11 Dec 2023 18:37:44 +0000 Subject: [PATCH] cornell: Temporarily work around issue #337 (#338) --- src/sample/cornell/common.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sample/cornell/common.wgsl b/src/sample/cornell/common.wgsl index 0d962b7b..32d52e8d 100644 --- a/src/sample/cornell/common.wgsl +++ b/src/sample/cornell/common.wgsl @@ -108,7 +108,7 @@ fn rand() -> f32 { 7919 * 631 * 5 * 3); rnd = (rnd * C) ^ (rnd.yzx >> vec3(4u)); - return f32(rnd.x ^ rnd.y) / f32(0xffffffff); + return f32(rnd.x ^ rnd.y) / 4294967295.0; // 4294967295.0 is f32(0xffffffff). See #337 } // Returns a random point within a unit sphere centered at (0,0,0).