Friday, November 22, 2013

[UDK Quick Tip] Alpha Channel sRGB

Just a quick reminder that alpha channels of a textures won't be stored in sRGB color space. Having linear data is crucial for height or normal maps, however when using the alpha channel for something like a specular map it will just look wrong.

A quick way to fix this is to do a linear -> sRGB conversion inside the material, by taking the power of 2.2. The downside of this method is an extra 5 instructions. Instead it's good practice to multiply the alpha channel by itself (=taking the power of 2) which is slightly wrong but only adding a single instruction.

No comments:

Post a Comment