Since OpenFrameworks doesn’t provide a difference blend mode of its own, I’m trying to figure out the best way to write my own. My first thought was to load the two images into ofPixel objects, then loop through and perform the necessary operations on a per-pixel basis. This would probably work, but seems horribly inefficient from a performance perspective.
Does anyone have suggestions on a better way of approaching this?
@Elaye – Thank you! Took me a little while to learn my way around GLSL, but I’ve got it up and running now.
@roymacdonald-- The blend mode I was looking for was “Difference,” which is sort of like “Subtract” except that it returns the absolute value of negative numbers, rather than just clamping to zero. I did find it a little strange how sparse the list of default blend modes was, but then my background is in animation and vfx so I might be a little skewed in my expectations
This has been, if nothing else, a great reason to finally make the push into GLSL. Thanks guys!