Separate sampler with arraylayer

Hello, I am a little bit lost here, I used to use combined sampled image.
my previous shader was like this:

layout(set = 0, binding = 1) uniform  sampler2DArray inSmpArray;
....
final = texture(inSmpArray, inUV);

the new requirement was to separate sampler and image because sometime the sampler may change.

layout(set = 0, binding = 1) uniform texture2D inSkins;
layout(set = 1, binding = 0) uniform sampler2DArray inSampler;
...
texture(sampler2Darray(inSkins, inSampler), inUV);

But It doesnt compile. I try to find how to use image arrayLayers + sampler but I only find image Array examples. Is it possible or I have to give up on Arraylayers and use image Array?
Thanks for your time

sampler2DArray is a combined sampler/image. If you want to use an equivalent that separates the sampler and the image, the image should be texture2DArray and the sampler type should be sampler.

1 Like

Merci.
Thank you it works perfectly now.