C Specification
The VkSamplerCreateInfo structure is defined as:
// Provided by VK_VERSION_1_0
typedef struct VkSamplerCreateInfo {
    VkStructureType         sType;
    const void*             pNext;
    VkSamplerCreateFlags    flags;
    VkFilter                magFilter;
    VkFilter                minFilter;
    VkSamplerMipmapMode     mipmapMode;
    VkSamplerAddressMode    addressModeU;
    VkSamplerAddressMode    addressModeV;
    VkSamplerAddressMode    addressModeW;
    float                   mipLodBias;
    VkBool32                anisotropyEnable;
    float                   maxAnisotropy;
    VkBool32                compareEnable;
    VkCompareOp             compareOp;
    float                   minLod;
    float                   maxLod;
    VkBorderColor           borderColor;
    VkBool32                unnormalizedCoordinates;
} VkSamplerCreateInfo;Members
- 
sTypeis a VkStructureType value identifying this structure.
- 
pNextisNULLor a pointer to a structure extending this structure.
- 
flagsis a bitmask of VkSamplerCreateFlagBits describing additional parameters of the sampler.
- 
magFilteris a VkFilter value specifying the magnification filter to apply to lookups.
- 
minFilteris a VkFilter value specifying the minification filter to apply to lookups.
- 
mipmapModeis a VkSamplerMipmapMode value specifying the mipmap filter to apply to lookups.
- 
addressModeUis a VkSamplerAddressMode value specifying the addressing mode for U coordinates outside [0,1).
- 
addressModeVis a VkSamplerAddressMode value specifying the addressing mode for V coordinates outside [0,1).
- 
addressModeWis a VkSamplerAddressMode value specifying the addressing mode for W coordinates outside [0,1).
- 
mipLodBiasis the bias to be added to mipmap LOD calculation and bias provided by image sampling functions in SPIR-V, as described in the LOD Operation section.
- 
anisotropyEnableisVK_TRUEto enable anisotropic filtering, as described in the Texel Anisotropic Filtering section, orVK_FALSEotherwise.
- 
maxAnisotropyis the anisotropy value clamp used by the sampler whenanisotropyEnableisVK_TRUE. IfanisotropyEnableisVK_FALSE,maxAnisotropyis ignored.
- 
compareEnableisVK_TRUEto enable comparison against a reference value during lookups, orVK_FALSEotherwise.- 
Note: Some implementations will default to shader state if this member does not match. 
 
- 
- 
compareOpis a VkCompareOp value specifying the comparison operator to apply to fetched data before filtering as described in the Depth Compare Operation section.
- 
minLodis used to clamp the minimum of the computed LOD value.
- 
maxLodis used to clamp the maximum of the computed LOD value. To avoid clamping the maximum value, setmaxLodto the constantVK_LOD_CLAMP_NONE.
- 
borderColoris a VkBorderColor value specifying the predefined border color to use.
- 
unnormalizedCoordinatescontrols whether to use unnormalized or normalized texel coordinates to address texels of the image. WhenunnormalizedCoordinatesisVK_TRUE, the range of the image coordinates used to lookup the texel is in the range of zero to the image size in each dimension. WhenunnormalizedCoordinatesisVK_FALSE, the range of image coordinates is zero to one.When unnormalizedCoordinatesisVK_TRUE, images the sampler is used with in the shader have the following requirements:- 
The viewTypemust be eitherVK_IMAGE_VIEW_TYPE_1DorVK_IMAGE_VIEW_TYPE_2D.
- 
The image view must have a single layer and a single mip level. When unnormalizedCoordinatesisVK_TRUE, image built-in functions in the shader that use the sampler have the following requirements:
- 
The functions must not use projection. 
- 
The functions must not use offsets. 
 
- 
Description
| Note | Mapping of OpenGL to Vulkan Filter Modes 
 There are no Vulkan filter modes that directly correspond to OpenGL
minification filters of  Note that using a  | 
The maximum number of sampler objects which can be simultaneously created
on a device is implementation-dependent and specified by the
maxSamplerAllocationCount member
of the VkPhysicalDeviceLimits structure.
| Note | For historical reasons, if  | 
Since VkSampler is a non-dispatchable handle type, implementations
may return the same handle for sampler state vectors that are identical.
In such cases, all such objects would only count once against the
maxSamplerAllocationCount limit.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.