Hello, everyone! In the previous video, we created a simulation of an electrical discharge using a line with multiple segments. This time, we’ll stick with a similar concept, although we’ll approach it a bit differently. We’ll create something like an ECG monitor that displays the characteristic heartbeat waveform.

  • I Cast Fist@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    27 days ago

    Why make it a shader? Couldn’t you get a similar effect by simply playing around with a Line2D node’s color with a gradient?

    • FencerDevLog@programming.devOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      27 days ago

      For example, because Line2D runs on the CPU, while a shader runs on the GPU (much faster). But of course, many effects can be achieved in different ways. I just happen to prefer shaders.