Texture Arrays not available on modern Android?

Hi,

I’m confused about the docs regarding Texture Arrays, which indicate that these are not available on Android/Vulkan: Unity - Manual: Texture arrays

However, I see mention in Vulkan tutorials about Texture Arrays, and I see lots of Unity assets using Texture Arrays that claim to work on Android. Does this in fact mean that you’re forced to run OpenGL ES on Android, and you can’t build to Android/Vulkan? Or are the Unity docs simply behind? What am I missing?

Thanks,

Per

This may answer my own question. D3D11.hlsl has array samplers under the SHADER_API_VULKAN definition.

So it seems that it does support it. I can’t figure out why the Unity documentation goes out of its way to say that it doesn’t.

#elif defined(SHADER_API_VULKAN)

...
...

   #define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index)                  textureName.Sample(samplerName, float3(coord2, index))
   #define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod)         textureName.SampleLevel(samplerName, float3(coord2, index), lod)
   #define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias)       textureName.SampleBias(samplerName, float3(coord2, index), bias)
   #define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy)

The docs are either wrong or the Unity renderer simply does not support it on Android, even though it is technically available if you were to program against Vulkan directly.

Try making a simple test case with 2d array and build it for Android, then you know for sure whether it works or not.