From 2a3a69752a0e0c871a4656cd7f0da077760a30d5 Mon Sep 17 00:00:00 2001 From: aashu2006 Date: Wed, 11 Feb 2026 02:02:24 +0530 Subject: [PATCH] Fix pixel indexing formula in Optimizing WebGl Sketches Tutorial --- src/content/tutorials/en/optimizing-webgl-sketches.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/tutorials/en/optimizing-webgl-sketches.mdx b/src/content/tutorials/en/optimizing-webgl-sketches.mdx index 4ac1aafd50..08877c0cac 100644 --- a/src/content/tutorials/en/optimizing-webgl-sketches.mdx +++ b/src/content/tutorials/en/optimizing-webgl-sketches.mdx @@ -457,7 +457,7 @@ function draw() {   loadPixels();   for (let x = 0; x < width; x += 1) {     for (let y = 0; y < height; y += 1) { -      let idx = (y * height + x) * 4; +      let idx = (y * width + x) * 4;       let newValue;       if (pixels[idx] + noise(x, y)*50 >= 220) {         newValue = 255;