Jump to content

  • Log In with Google      Sign In   
  • Create Account

Setting levels


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Kdeon   Members   -  Reputation: 141

Like
0Likes
Like

Posted 25 April 2014 - 12:31 PM

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 ?



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS