Shader performance on Android is significantly reduced by getting an element in a constant array

Hello !
I wrote a shader that unpacks mesh data for a voxel game and everything was working fine until I tested it on my Android phone … 3 FPS :frowning:
After a lot of testing I found out where the problem comes from :

float3 normalVector = normals[normal];

If I replace that line by anything else (a switch for example), my FPS goes up to 30 !

normals is a constant array and normal is a uint :

static const float3 normals[] = {
    float3(1,0,0),  // x+
    float3(0,0,1),  // z+
    float3(0,1,0),  // y+
    float3(-1,0,0), // x-
    float3(0,0,-1), // z-
    float3(0,-1,0), // y-
};

I don’t understand how this particular array can cause such a huge performance loss. The other constant arrays that I use in the shader don’t seem to cause any problems, I tried to remove the colors or the faceLightLevels array and that did not improve my frame rate.

Is there something I’m doing wrong ?

Here is the full shader :
VoxelShader.shader (4.6 KB)

Actually I can even replace it by getting an element in another array (of course then the shader looks bad because the normal is incorrect but that shows the problem is indeed related to the normals array).
I did this for example :

float3 normalVector = cubeVertices[normal];

cubeVertices is a float3 array just like normals.