I'm currently planning to use a 2D image array (image2d_array_t) to store read-only material information, i.e. one slice for each material, however I am having difficulties understanding how to sample it properly. Is there a way to enable linear filtering on the x- and y- dimensions, but disable sampling in the z-dimension? Something akin to:

Code :
read_imagef(my_image, my_sampler, (float2)(x, y), (int)(slice_index))

Or do I need to use the old +0.5 offset trick to exactly sample the desired slice so that other slices don't "bleed" on the result?

I would imagine there is a way to select the desired slice, since otherwise 2D image arrays would be equivalent to 3D images and thus redundant, yet I cannot find any indication of that in the spec.