]> zoso.dev Git - nano-pow.git/commitdiff
Rename random input for clarity of intent.
authorChris Duncan <chris@zoso.dev>
Tue, 11 Feb 2025 21:43:20 +0000 (13:43 -0800)
committerChris Duncan <chris@zoso.dev>
Tue, 11 Feb 2025 21:43:20 +0000 (13:43 -0800)
src/shaders/compute.wgsl

index 3d7aab98bdd3afd4e5cf1cce7fc911513b942409..179a478e39e764c4b1d4a09052b6742f6419d031 100644 (file)
@@ -6,7 +6,7 @@
 */
 struct UBO {
        blockhash: array<vec4<u32>, 2>,
-       random: vec2<u32>,
+       seed: vec2<u32>,
        threshold: u32
 };
 @group(0) @binding(0) var<uniform> ubo: UBO;
@@ -80,7 +80,7 @@ fn main(id: vec3<u32>) {
        /**
        * Initialize (nonce||blockhash) concatenation
        */
-       let m0: vec2<u32> = ubo.random ^ id.xy;
+       let m0: vec2<u32> = ubo.seed ^ id.xy;
        let m1: vec2<u32> = ubo.blockhash[0u].xy;
        let m2: vec2<u32> = ubo.blockhash[0u].zw;
        let m3: vec2<u32> = ubo.blockhash[1u].xy;