Hey guys,
I was trying to invert a channel of a normal map by shader code in UDK. So I used the OneMinus node in UDK and I was confused with the middle grey tones ending up being a different shade of grey after inverted. What am I doing wrong here?
I was expecting a mid grey color to have no change when being "inverted" (OneMinus, 1-x).
Pic:
Replies
Hopefully that should fix it.
Now to read up on SRGB and what I just missed out on by unchecking it
EDIT:
Sorry, in my case, add the Power after applying your OneMinus.
I'm pretty sure it has something to do with linear VS. non-linear interpretation of the colors - gamma correction.
http://udn.epicgames.com/Three/TextureProperties.html#SRGB
http://udn.epicgames.com/Three/GammaCorrection.html
I've done similar when creating shaders in Mental Mill.
You generally want your to convert your texture from gamma space to linear space since your other shader calculations are done in linear space. The at the end of all your shader calculations before sending along your shader result you want to convert back to gamma space.