View Full Version : Inverting a mid grey color in UDK Material Editor
12-15-2010, 05:43 AM
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).
12-15-2010, 11:54 AM
Double click your texture in the Content Browser to bring up the Texture Properties window. Then scroll down and uncheck SRGB.
Hopefully that should fix it.
12-15-2010, 12:04 PM
Thank you Ben!
Now to read up on SRGB and what I just missed out on by unchecking it :)
12-15-2010, 12:08 PM
Was solved with applying a Power node with Exponent of 2.2 after loading the texture. Now this whole dilemma makes sense.
Sorry, in my case, add the Power after applying your OneMinus. :)
12-15-2010, 12:12 PM
I'm pretty sure it has something to do with linear VS. non-linear interpretation of the colors - gamma correction.
12-15-2010, 12:27 PM
Yes it does.
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.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.