blendMode渲染问题p5.js

时间:2020-03-29 21:47:10

标签: javascript rendering p5.js simplex-noise blend-mode

我一直遇到性能问题,试图可视化一些单纯噪声。在blendMode(MULTIPLY)函数中设置setup会产生一些滞后的结果。有关完整代码,请参见this codepen。我降低了框架,但没有帮助。为什么blendMode在计算上如此繁重? ?

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);
}

0 个答案:

没有答案