]> zoso.dev Git - libnemo.git/commitdiff
Formatting.
authorChris Duncan <chris@zoso.dev>
Mon, 16 Dec 2024 21:53:37 +0000 (13:53 -0800)
committerChris Duncan <chris@zoso.dev>
Mon, 16 Dec 2024 21:53:37 +0000 (13:53 -0800)
src/lib/workers/pow.ts

index fc1080bd6241581c93f884736d8962cb1beecfef..5394dc32de4a6f2dc96fa810b79d68d7416b09d4 100644 (file)
@@ -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(