Hello,
So I am trying to read pixels from a texture 2d :
Texture2D texture = new Texture2D(inputDimension.x, inputDimension.y);
Graphics.ConvertTexture(renderTextures, texture);
for(int j = 0; j < texture.width; j++)
{
for(int k = 0; k < texture.height; k++)
{
Debug.Log(texture.GetPixel(j, k));
}
}
//mostly for debuging
displayTexture = texture;
Now, in the inspector, displayTexture is the right texture, with colors and so.
But, the GetPixel line only return (0.804, 0.804, 0.804)
Where did i messed up ?
I haven’t really used ConvertTexture (haven’t even noticed when it was added) however from the documentation it seems like render textures are not supported.