All Photoshop blending modes + RGB to HSL, contrast, etc. in a GLSL shader

Romz

Newcomer
Hi there,

Something that might interest you.. all the Photoshop blending modes as GLSL macros + RGB to HSL (hue, saturation, luminance), contrast, desaturation.
Everything is here: http://blog.mouaif.org/2009/01/05/photoshop-math-with-glsl-shaders/

Of course it's open to discussion and I know for sure .. optimization!
I did everything in my own little Ogre editor/demo engine (which stays very basic but very convenient and fast to make new Ogre 'demos'), so I wanted to share my shader code with you too ;)

photoshopmath_tn.jpg


photoshopmath_editor_tn.jpg


Hope it could help.


(I'm not sure I posting in the right place on these forums, so feel free to move it if needed.)

--
Romz
 
Thanks a lot for this. There have been several instances where I needed to reproduce a photoshop effect for an artist and digging out the specifics of the math was always suprisingly difficult.
 
I'm sorry but in a last minute change before uploading I made a mistake in the code, and I also had some issues on specific hardware due to conditional returns, but now it's fixed and if you already have the .glsl file you should re-download it (same link).

And good news, now it's also in HLSL.

Thank you!
 
Back
Top