View Full Version : Blending Modes
07-26-2007, 08:43 AM
Hi, I was wondering if anyone knows if it's possible to reproduce some of Photoshop's blending modes in OpenGL.
I'm particularly interested in the vivid light (additive) blending mode. I'm currently using GL_SRC_ALPHA, GL_ONE for additive blending but it's not nearly as good looking as photoshop's vivid light.
This is very annoying as I use vivid light a lot in Photoshop, and the end result is very different in opengl, thus I can't really use it.
07-26-2007, 01:49 PM
You are wrong, vivid light is not a simple addition.
From here you get the exact formula :
It looks hard to do without a fragment shader... not that hard but it is a bit more involved.
See for example :
07-26-2007, 07:43 PM
Someone else also asked something similar:
07-28-2007, 04:59 AM
I was kind of afraid that it wouldn't be that simple.. I tried to find an article that describes the equations but couldn't find a one.
Unfortunately I can't use shaders as I want to keep compatibility around opengl 1.1 - 1.3.
Also, I can ignore performance (at least for now), as I mainly want to generate textures by tinting them with a vivid light overlay.
Have I understood it right, that I need to use glReadPixels to achieve this, if I do not use shaders? So shaders would give me just performance?
Thanks a lot for the links, I'm sure I can figure it out with those eventually.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.