From caaa5f8b36d7a0e09057cbd26d19c22400ca8880 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Mon, 16 Dec 2024 13:53:37 -0800 Subject: [PATCH] Formatting. --- src/lib/workers/pow.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/workers/pow.ts b/src/lib/workers/pow.ts index fc1080b..5394dc3 100644 --- a/src/lib/workers/pow.ts +++ b/src/lib/workers/pow.ts @@ -164,6 +164,7 @@ void main() { // two bytes are modified from the random generated value, XOR'd with // the x,y area index of where this pixel is located m[0] = (x_pos ^ (y_pos << 8) ^ ((u_work0.b ^ x_index) << 16) ^ ((u_work0.a ^ y_index) << 24)); + // Remaining bytes are un-modified from the random generated value m[1] = (u_work1.r ^ (u_work1.g << 8) ^ (u_work1.b << 16) ^ (u_work1.a << 24)); @@ -184,10 +185,8 @@ void main() { B2B_G(6, 8, 18, 28, SIGMA82[i * 16 + 14], SIGMA82[i * 16 + 15]); } - // Threshold test, first 4 bytes not significant, - // only calculate digest of the second 4 bytes - //if((BLAKE2B_IV32_1 ^ v[1] ^ v[17]) > threshold) { - // Success found, set pixel data so work value can be constructed + // Pixel data is multipled by threshold test result (0 or 1) + // First 4 bytes insignificant, only calculate digest of second 4 bytes fragColor = mix( fragColor, vec4( -- 2.34.1