The unnormalized texel coordinates are transformed to integer texel coordinates relative to the selected mipmap level.
The layer index l is computed as:
where layerCount
is the number of layers in the image subresource
range of the image view, baseArrayLayer
is the first layer from the
subresource range, and where:
The sample index n is assigned the value zero.
Nearest filtering (VK_FILTER_NEAREST
) computes the integer texel
coordinates that the unnormalized coordinates lie within:
Linear filtering (VK_FILTER_LINEAR
) computes a set of neighboring
coordinates which bound the unnormalized coordinates. The integer texel
coordinates are combinations of
$i_0\textrm{ or }i_1,j_0\textrm{ or }j_1,k_0\textrm{ or }k_1$
,
as well as weights
$\alpha, \beta, and \gamma$
.
If the image instruction includes a $ConstOffset$ operand, the constant offsets $(\Delta_{i},\Delta_{j},\Delta_{k})$ are added to $(i,j,k)$ components of the integer texel coordinates.