I am doing a very basic GreyScale shader, and wanted to add some Contrast and Brightness.
I would like to know the Syntaxes I have to use to figure out this:
The formulas I found/use some great dutch tutorial about photoshop filters. Here they use the Maxium value (per color) and Minimum value (per Color) to calculate the middle off the color spectrum. (for red: R_Max + R_min / 2 )
Also another tutorial I found uses the Mean value (avarage) off the colors.
I am using this Microsoft Page as a guideline for the syntaxes (or is it called functions?), if any one knows a better one, please share!
Thnx for helping me, realy want to understand this.
0.5 is not the middle off every color spectrum, that is why I would like to calculate it.
I attached my Grey Shader, it has 2 ways off calculating grey, and a Brightness thingy.
For now I just copied/pasted the brightness, but is there any clever way not to do this? Realy hope so, because I want to add color balance and (if ever) contrast.