blendMode rendering issues p5.js

I keep running into performance issues trying to visualize some simplex noise – using about 1700 circle objects. Setting the blendMode(MULTIPLY) in the setup function has been producing some laggy results. See this codepen for full code. I’ve lowered the frame but that hasn’t helped. Any ideas why blendMode is so computationally taxing? :pray:

function setup() {
  frameRate(30);
  createCanvas(windowWidth, windowHeight);
  xCoord = round(windowWidth / (cells - 2));
  yCoord = round(windowHeight / (cells - 2));
  blue = color("rgba(2,128,215,0.75)");
  pink = color("rgba(228,15,41,0.75)");
  yellow = color("rgba(246,232,0,0.75)");
  blendMode(MULTIPLY);
}
1 Like

I’m not sure – you could check out the test sketches and the definition in p5.js core –