New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradients are very taxing #2750
Comments
hopefully this is coming very soon. a side-effect of #2670 is per-vertex coloring. translate(-width/2, -height/2);
noStroke();
beginShape();
fill(255, 0, 0);
vertex(0, 0);
vertex(width, 0);
fill(0, 255, 0);
vertex(width, height);
vertex(0, height);
endShape(CLOSE); |
@Spongman That sounds good. For now, I added a "gradientDetail" variable:
|
Relates to #4141 |
Per-vertex fill for WEBGL is working as #4147 . The code in the comments will produce the desired gradient in the current |
Nature of issue?
Most appropriate sub-area of p5.js?
Which platform were you using when you encountered this?
New feature details: I would like to request a better way to create a gradient. My app (clay53.github.io/Art-Project-1; https://repl.it/@ClaytonHickey/Art-Project-1) has a gradient background and other kind of gradients. However, the current way to do this according to the reference (https://p5js.org/examples/color-linear-gradient.html) is to create a bunch of lines with strokes of different colors. This way is very taxing in WebGL, much more than in the default rendering engine, however, I have to use WebGL for "layers". If anyone knows how to make a better gradient it should definitely be integrated into the base methods for p5.js - also, please tell me.
The text was updated successfully, but these errors were encountered: