]> zoso.dev Git - libnemo.git/commitdiff
Formatting.
authorChris Duncan <chris@zoso.dev>
Tue, 17 Dec 2024 15:11:25 +0000 (07:11 -0800)
committerChris Duncan <chris@zoso.dev>
Tue, 17 Dec 2024 15:11:25 +0000 (07:11 -0800)
src/lib/workers/pow.ts

index 8f05539582ed819d8b491c287baccbbed3afb4f7..6da0eab858fff7d8758fc129bdce32f14c234c9b 100644 (file)
@@ -20,7 +20,7 @@ export class Pow {
        * Author:  numtel <ben@latenightsketches.com>
        * License: MIT
        */
-       // Vertext Shader
+       // Vertex Shader
        static #vsSource = `#version 300 es
 precision highp float;
 layout (location=0) in vec4 position;
@@ -187,17 +187,16 @@ void main() {
 
        // 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(
-                               float(x_index + 1u)/255., // +1 to distinguish from 0 (unsuccessful) pixels
-                               float(y_index + 1u)/255., // Same as previous
-                               float(x_pos)/255., // Return the 2 custom bytes used in work value
-                               float(y_pos)/255.  // Second custom byte
-                       ),
-                       float((BLAKE2B_IV32_1 ^ v[1] ^ v[17]) > threshold)
-               );
-       //}
+       fragColor = mix(
+               fragColor,
+               vec4(
+                       float(x_index + 1u)/255., // +1 to distinguish from 0 (unsuccessful) pixels
+                       float(y_index + 1u)/255., // Same as previous
+                       float(x_pos)/255., // Return the 2 custom bytes used in work value
+                       float(y_pos)/255.  // Second custom byte
+               ),
+               float((BLAKE2B_IV32_1 ^ v[1] ^ v[17]) > threshold)
+       );
 }`
 
        /** Used to set canvas size. Must be a multiple of 256. */