Skip to content

Instantly share code, notes, and snippets.

@jaycody
Created March 31, 2017 22:45
Show Gist options
  • Save jaycody/c6ee782b9822697e9fdfcefdc4806e33 to your computer and use it in GitHub Desktop.
Save jaycody/c6ee782b9822697e9fdfcefdc4806e33 to your computer and use it in GitHub Desktop.
keyPress switch blend modes
void keyPressed() {
// different blend modes
if (key == '1') {
depthImageBlendMode = BLEND;
println("Blend mode: BLEND");
}
else if (key == '2') {
depthImageBlendMode = ADD;
println("Blend mode: ADD");
}
else if (key == '3') {
depthImageBlendMode = SUBTRACT;
println("Blend mode: SUBTRACT");
}
else if (key == '4') {
depthImageBlendMode = DARKEST;
println("Blend mode: DARKEST");
}
else if (key == '5') {
depthImageBlendMode = LIGHTEST;
println("Blend mode: LIGHTEST");
}
else if (key == '6') {
depthImageBlendMode = DIFFERENCE;
println("Blend mode: DIFFERENCE");
}
else if (key == '7') {
depthImageBlendMode = EXCLUSION;
println("Blend mode: EXCLUSION");
}
else if (key == '7') {
depthImageBlendMode = MULTIPLY;
println("Blend mode: MULTIPLY");
}
else if (key == '8') {
depthImageBlendMode = SCREEN;
println("Blend mode: SCREEN");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment