• pineapple@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    12 days ago

    Don’t these things take like ages to compute? how is it doing this so quickly in a web browser? This is insanely cool

    • ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      12 days ago

      Modern browsers can compute fractals quickly using the GPU because a WebGL fragment shader can operate on every pixel simultaneously. For each pixel, the shader maps the screen coordinates to the complex plane and iterates the equation until the value escapes. And all the pixel calculations are then done in parallel.