From d708900ed71f32d35e484652e3dab43daf013d1d Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 17 Dec 2024 07:11:25 -0800 Subject: [PATCH] Formatting. --- src/lib/workers/pow.ts | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/lib/workers/pow.ts b/src/lib/workers/pow.ts index 8f05539..6da0eab 100644 --- a/src/lib/workers/pow.ts +++ b/src/lib/workers/pow.ts @@ -20,7 +20,7 @@ export class Pow { * Author: numtel * 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. */ -- 2.34.1