I am trying to implement a Difference blend mode, but I haven’t been able to find a way to make it within ES2. The function necessary is:
The problem I am having is that gl clamps colours, so even if I could find out how to get “abs” to work somehow, I would need to have the built in clamping not happen.
I had a look at ofxPSBlend but unfortunately that won’t work with OpenGL ES2
Here is an image that shows a prototype of the colours in processing which has Difference:
The final piece will be compounded circles, so just calculating the resulting shape and colour and then drawing that as a seperate component would not work unfortunately.
Any thoughts on this would be really useful, thanks!