Sign in to follow this  

Setting levels

This topic is 1363 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

Hey guys,


I'm trying to tint a texture like Photoshop (and photofiltre) does. I use shaders to do that.

I can't find anything on the net so I post here.

For the light tint, I make sure that if each rgb colors are above 0.85, then I alter them, but it varies depending on the distance.

"if( texcol.r > 0.85 ) gl_FragColor.r = texcol.r * altered_red;\n"
same for .g and .b

Not sure what I need to do for the light tint.


For the mid tint, I simply use pow( texcol, ( 2-vec3( altered_red, altered_green, altered_blue ) ) ). I'm not sure if it's right

As for the dark tint, I simply multiply the texture color by the altered color value (it seems to be right).


About brightness/contrast, I found this, it works well for the brightness, but for the contrast, it's not a real contrast, instead if makes the scene much more "lighty". I'm not sure how to achieve a real contrast with this shader.


Any of you guys already achieved tinturation like photoshop does ?

Share this post

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