I've generated a Texture2DArray from array of Texture2Ds and for some reason, when my shader is using Texture Array the output colors are noisy, almost as if noise filter was applied on them. Compare,
And when using Texture2DArray:

I generate array using this code:
Texture2D sample = materials[0].albedo;
materialArray = new Texture2DArray(sample.width, sample.height,
materials.Count * 4, TextureFormat.RGBA32, false);
for (int i = 0; i < materials.Count; i += 4)
{
T_Material material = materials[i];
materialArray.SetPixels(material.albedo.GetPixels(), i);
materialArray.SetPixels(material.normal.GetPixels(), i + 1);
materialArray.SetPixels(material.occulusion.GetPixels(), i + 2);
materialArray.SetPixels(material.rougness.GetPixels(), i + 3);
}
materialArray.Apply(true);
AssetDatabase.CreateAsset(materialArray, "Assets/_Generated/" + "terrainTextures.asset");
AssetDatabase.SaveAssets();
Initial Texture2Ds are in RGBA 32bit format:
Generated Texture2DArray (4 Textures, albedo, normal, AO, roughness, But I am only using albedo in shader for now):
My shader is simple, it extracts color data from Texture2DArray using index and applies it to PBR's albedo input.
And yes, I tried without my special blending effects, just inserting RGBA4 output to Albedo input of PBR both from Texture2DArray sampler and directly from Texture2D sampler.
Results were the same, Texture2DArray is noisy!
Thanks for any help!



