We are about to switch to a new forum software. Until then we have removed the registration on this forum.
In P2D if you write a code like this
beginShape(); fill(255, 0, 0); vertex(x1, y1); fill(0, 255, 0); vertex(x2, y2); fill(0, 0, 255); vertex(x3, y3); endShape();
the output is a triangle which is filled with color that varies across its surface, interpolating between R/G/B linearly.
Is there a simple way to write a shader that would interpolate the three colors differently? If yes, can you please guide me how to do that? Would this be a vertex or a fragment shader?