When I Use SetPixel and GetPixel to wirte & read value in the texture,the value is not the same value i put there.Why is this happen?
Code is simple:
Texture2D texture2d = new Texture2D(512, 512, TextureFormat.RGBA32, false);
Color color = new Color(0.002, 0.10113, 0.01153, 0.11114);
texture2d.SetPixel(0, 0, color);
texture2d.Apply();
Color output = texture2d.GetPixel(0, 0);
// output = (0.003921569, 0.1019608, 0.01176471, 0.1098039);
Could anyone tell my why?