Hello,
I just switched my project to Linear Space Lighting and encountered an issue with the normal maps I’m loading at runtime. The known workaround for normalmaps when loaded with the WWW class is the following:
Color32[] colors = texture.GetPixels32();
byte r, g, b, a;
for (int i = colors.Length-1; i >= 0; i--)
{
Color32 c = colors[i];
r = g = b = c.g;
a = c.r;
colors[i] = new Color32(r, g, b, a);
}
texture.SetPixels32(colors);
However, these normal maps don’t work with Linear Space Lighting and cause rather strange looking bugs, most certainly caused by offset RGBA values of the loaded normal map. Has anyone used runtime loaded normal maps with Linear Space Lighting before?