Was wondering if it’s possible to replicate the blending functions found in photoshop and other graphics software with gl blend funcs?
I can see that I can replicate(or approximate?) only a couple, like ‘screen’ for example with:
note that I’m not certain if this is actually doing the screen function but it looks close to me…are the more complex blend funcs done in multiple passes? if anyone could point me in the right direction it would be much appreciated…
some of the blend functions…
screen overlay darken lighten colorDodge colorBurn softLight darkLight…etc…
This page details the formulas behind each of these “classic” types:
Searching for “photoshop” on this forums returns :
The opengl blending mode and its extensions can already perform most useful combinations, off the top of my head : normal blend, add, substract, are easy.
Then for the others it would be better to use a shader that blends between two textures, in which you can code whatever fancy you want.
The risk with doing multipass is that you will loose in color precision unless you can have floating point render buffer (and it will be probably slower anyway).
Thanks for those links they were very helpful!