You know that OpenGL can support MULTIPLY with the built-in blend functions, so you could just use blendMode(MULTIPLY)? Note that due to Processing’s use of un-premultiplied alpha, multiply is a bit broken with translucent images, but if they’re opaque it’s fine.