Jump to content
  • Advertisement
Sign in to follow this  
Romz

All Photoshop blending modes + RGB to HSL, contrast and more in GLSL/HLSL shaders

This topic is 3525 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ;) Photoshop screenshot http://mouaif.files.wordpress.com/2009/01/photoshopmath_tn.jpg?w=440&h=198 Editor (GLSL code) screenshot http://mouaif.files.wordpress.com/2009/01/photoshopmath_editor_tn.jpg?w=440&h=344 Hope it could help. Update: 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: http://blog.mouaif.org/2009/01/08/photoshop-math-with-hlsl-shaders/. Thank you! Romz -- Update 22/01/2009: Gamma correction filter added. Update 28/01/2009: Complete Levels control added. [Edited by - Romz on January 27, 2009 5:22:33 PM]

Share this post


Link to post
Share on other sites
Advertisement
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: http://blog.mouaif.org/2009/01/08/photoshop-math-with-hlsl-shaders/.

Thank you!

Share this post


Link to post
Share on other sites
Hi,

Just added a gamma correction filter. Just like the Exposure/gamma or Levels/midtone in photoshop.

Details and code here:
http://blog.mouaif.org/2009/01/22/photoshop-gamma-correction-shader/

Share this post


Link to post
Share on other sites
Hi,

I added the complete reproduction of the Photoshop Levels control.

Image: http://mouaif.files.wordpress.com/2009/01/levels-all.jpg?w=405&h=301

Details and code here: http://blog.mouaif.org/2009/01/28/levels-control-shader/

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!