True, the best renderer I think is P2D.
The code below testing the blendMode() method gives me same results on PC and Android without errors, but I don’f get the expected results; Some seem to have no effect at all.
Or maybe I am testing this the wrong way?
Edit: actually I do get warnings in P2D renderer on PC, not on Android.
and also not with the default or FX2D renderer.
blendMode(DIFFERENCE) is not supported by this renderer
blendMode(OVERLAY) is not supported by this renderer
blendMode(HARD_LIGHT) is not supported by this renderer
blendMode(SOFT_LIGHT) is not supported by this renderer
blendMode(DODGE) is not supported by this renderer
blendMode(BURN) is not supported by this renderer
Anyways also in P2D it doesn’t look right.
int mode;
String[] txt = {"BLEND", "ADD", "SUBTRACT", "DARKEST", "LIGHTEST", "DIFFERENCE", "EXCLUSION", "MULTIPLY", "SCREEN", "OVERLAY", "HARD_LIGHT", "SOFT_LIGHT", "DODGE", "BURN"};
int[] modes = {BLEND, ADD, SUBTRACT, DARKEST, LIGHTEST, DIFFERENCE, EXCLUSION, MULTIPLY, SCREEN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, DODGE, BURN};
void setup() {
size (600, 600, P2D);
textSize(30);
println(mode+" "+txt[mode]);
}
void draw() {
push();
blendMode(modes[mode]);
fill(255, 0, 0);
rect(0, 0, 200, 600);
rect(0, 0, 600, 200);
fill(0, 255, 0);
rect(200, 0, 200, 600);
rect(0, 200, 600, 200);
fill(0, 0, 255);
rect(400, 0, 200, 600);
rect(0, 400, 600, 200);
pop();
fill(0);
text(txt[mode], 10, 50);
fill(255);
text(txt[mode], 230, 50);
}
void mousePressed() {
mode++;
if (mode == 14) mode = 0;
println(mode+" "+txt[mode]);
}