]> zoso.dev Git - libnemo.git/commitdiff
Clean up commenting.
authorChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 13:52:46 +0000 (05:52 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 2 Jan 2025 13:52:46 +0000 (05:52 -0800)
src/lib/workers/powgpu.ts

index 18e883cec67b6712c9a777a4d65cc7f2cc5d7953..b27f31c4479c8eee072d92a875a616bb66db1303 100644 (file)
@@ -135,17 +135,18 @@ export class PowGpu extends WorkerInterface {
 
                /**
                * Main compute function
+               *
+               * 8-byte work is split into two 4-byte u32
+               * First 4 bytes will be iterated by shader
+               * Last 4 bytes are defined by index of each thread
                */
                @compute @workgroup_size(256)
                fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
                        var m: array<u32, 16>;
 
-                       // 8-byte work is split into two 4-byte u32
-                       // First 6 bytes provided, last 2 bytes defined by this compute index
                        m[0u] = ubo.rand.x;
                        m[1u] = (ubo.rand.y << 16u) ^ global_id.x;
 
-                       // Block hash
                        m[2u] = ubo.blockhash[0u].x;
                        m[3u] = ubo.blockhash[0u].y;
                        m[4u] = ubo.blockhash[0u].z;