Class VkSamplerCreateInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
Mapping of OpenGL to Vulkan Filter Modes
magFilter values of FILTER_NEAREST and FILTER_LINEAR directly correspond to GL_NEAREST and GL_LINEAR magnification filters. minFilter and mipmapMode combine to correspond to the similarly named OpenGL minification filter of GL_minFilter_MIPMAP_mipmapMode (e.g. minFilter of FILTER_LINEAR and mipmapMode of SAMPLER_MIPMAP_MODE_NEAREST correspond to GL_LINEAR_MIPMAP_NEAREST).
There are no Vulkan filter modes that directly correspond to OpenGL minification filters of GL_LINEAR or GL_NEAREST, but they can be emulated using SAMPLER_MIPMAP_MODE_NEAREST, minLod = 0, and maxLod = 0.25, and using minFilter = FILTER_LINEAR or minFilter = FILTER_NEAREST, respectively.
Note that using a maxLod of zero would cause magnification to always be performed, and the magFilter to always be used. This is valid, just not an exact match for OpenGL behavior. Clamping the maximum LOD to 0.25 allows the λ value to be non-zero and minification to be performed, while still always rounding down to the base level. If the minFilter and magFilter are equal, then using a maxLod of zero also works.
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 maxSamplerAllocationCount is exceeded, some implementations may return ERROR_TOO_MANY_OBJECTS. Exceeding this limit will result in undefined behavior, and an application should not rely on the use of the returned error code in order to identify when the limit is reached.
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.
Valid Usage
- The absolute value of
mipLodBiasmust be less than or equal toVkPhysicalDeviceLimits::maxSamplerLodBias - If the
VK_KHR_portability_subsetextension is enabled, andVkPhysicalDevicePortabilitySubsetFeaturesKHR::samplerMipLodBiasisFALSE,mipLodBiasmust be zero maxLodmust be greater than or equal tominLod- If the
samplerAnisotropyfeature is not enabled,anisotropyEnablemust beFALSE - If
anisotropyEnableisTRUE,maxAnisotropymust be between1.0andVkPhysicalDeviceLimits::maxSamplerAnisotropy, inclusive - If sampler Y′CBCR conversion is enabled and the potential format features of the sampler Y′CBCR conversion do not support
FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT,minFilterandmagFiltermust be equal to the sampler Y′CBCR conversion’schromaFilter - If
unnormalizedCoordinatesisTRUE,minFilterandmagFiltermust be equal - If
unnormalizedCoordinatesisTRUE,mipmapModemust beSAMPLER_MIPMAP_MODE_NEAREST - If
unnormalizedCoordinatesisTRUE,minLodandmaxLodmust be zero - If
unnormalizedCoordinatesisTRUE,addressModeUandaddressModeVmust each be eitherSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGEorSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - If
unnormalizedCoordinatesisTRUE,anisotropyEnablemust beFALSE - If
unnormalizedCoordinatesisTRUE,compareEnablemust beFALSE - If any of
addressModeU,addressModeVoraddressModeWareSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,borderColormust be a validVkBorderColorvalue - If sampler Y′CBCR conversion is enabled,
addressModeU,addressModeV, andaddressModeWmust beSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,anisotropyEnablemust beFALSE, andunnormalizedCoordinatesmust beFALSE - If sampler Y′CBCR conversion is enabled and the
pNextchain includes aVkSamplerReductionModeCreateInfostructure, then the sampler reduction mode must beSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE - If the
samplerFilterMinmaxfeature is not enabled and thepNextchain includes aVkSamplerReductionModeCreateInfostructure, then the sampler reduction mode must beSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE - If the
samplerMirrorClampToEdgefeature is not enabled, and if theVK_KHR_sampler_mirror_clamp_to_edgeextension is not enabled,addressModeU,addressModeVandaddressModeWmust not beSAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE - If
compareEnableisTRUE,compareOpmust be a validVkCompareOpvalue - If either
magFilterorminFilterisFILTER_CUBIC_EXT,anisotropyEnablemust beFALSE - If the
VK_EXT_filter_cubicextension is not enabled and eithermagFilterorminFilterisFILTER_CUBIC_IMG, thereductionModemember ofVkSamplerReductionModeCreateInfomust beSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE - If
compareEnableisTRUE, thereductionModemember ofVkSamplerReductionModeCreateInfomust beSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE - If
flagsincludesSAMPLER_CREATE_SUBSAMPLED_BIT_EXT, thenminFilterandmagFiltermust be equal - If
flagsincludesSAMPLER_CREATE_SUBSAMPLED_BIT_EXT, thenmipmapModemust beSAMPLER_MIPMAP_MODE_NEAREST - If
flagsincludesSAMPLER_CREATE_SUBSAMPLED_BIT_EXT, thenminLodandmaxLodmust be zero - If
flagsincludesSAMPLER_CREATE_SUBSAMPLED_BIT_EXT, thenaddressModeUandaddressModeVmust each be eitherSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGEorSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - If
flagsincludesSAMPLER_CREATE_SUBSAMPLED_BIT_EXT, thenanisotropyEnablemust beFALSE - If
flagsincludesSAMPLER_CREATE_SUBSAMPLED_BIT_EXT, thencompareEnablemust beFALSE - If
flagsincludesSAMPLER_CREATE_SUBSAMPLED_BIT_EXT, thenunnormalizedCoordinatesmust beFALSE - If the
nonSeamlessCubeMapfeature is not enabled,flagsmust not includeSAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT - If
borderColoris one ofBORDER_COLOR_FLOAT_CUSTOM_EXTorBORDER_COLOR_INT_CUSTOM_EXT, then aVkSamplerCustomBorderColorCreateInfoEXTmust be included in thepNextchain - If the
customBorderColorsfeature is not enabled,borderColormust not beBORDER_COLOR_FLOAT_CUSTOM_EXTorBORDER_COLOR_INT_CUSTOM_EXT - If
borderColoris one ofBORDER_COLOR_FLOAT_CUSTOM_EXTorBORDER_COLOR_INT_CUSTOM_EXT, andVkSamplerCustomBorderColorCreateInfoEXT::formatis notFORMAT_UNDEFINED,VkSamplerCustomBorderColorCreateInfoEXT::customBorderColormust be within the range of values representable informat - The maximum number of samplers with custom border colors which can be simultaneously created on a device is implementation-dependent and specified by the
maxCustomBorderColorSamplersmember of theVkPhysicalDeviceCustomBorderColorPropertiesEXTstructure - If
flagsincludesSAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, thedescriptorBufferCaptureReplayfeature must be enabled - If the
pNextchain includes aVkOpaqueCaptureDescriptorDataCreateInfoEXTstructure,flagsmust containSAMPLER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT - If
flagsincludesSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, thenminFilterandmagFiltermust beFILTER_NEAREST - If
flagsincludesSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, thenmipmapModemust beSAMPLER_MIPMAP_MODE_NEAREST - [If
flagsincludesSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, thenminLodandmaxLodmust be zero - If
flagsincludesSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, thenaddressModeUandaddressModeVmust each be eitherSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGEorSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - If
flagsincludesSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, and ifaddressModeUoraddressModeVisSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, thenborderColormust beBORDER_COLOR_FLOAT_TRANSPARENT_BLACK - If
flagsincludesSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, thenanisotropyEnablemust beFALSE - If
flagsincludesSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM, thencompareEnablemust beFALSE
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SAMPLER_CREATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkOpaqueCaptureDescriptorDataCreateInfoEXT,VkSamplerBlockMatchWindowCreateInfoQCOM,VkSamplerBorderColorComponentMappingCreateInfoEXT,VkSamplerCubicWeightsCreateInfoQCOM,VkSamplerCustomBorderColorCreateInfoEXT,VkSamplerReductionModeCreateInfo, orVkSamplerYcbcrConversionInfo - The
sTypevalue of each struct in thepNextchain must be unique flagsmust be a valid combination ofVkSamplerCreateFlagBitsvaluesmagFiltermust be a validVkFiltervalueminFiltermust be a validVkFiltervaluemipmapModemust be a validVkSamplerMipmapModevalueaddressModeUmust be a validVkSamplerAddressModevalueaddressModeVmust be a validVkSamplerAddressModevalueaddressModeWmust be a validVkSamplerAddressModevalue
See Also
Layout
struct VkSamplerCreateInfo {
VkStructureType sType();
void const * 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();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkSamplerCreateInfo(ByteBuffer container) Creates aVkSamplerCreateInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintaVkSamplerAddressModevalue specifying the addressing mode for U coordinates outside[0,1).addressModeU(int value) Sets the specified value to theaddressModeU()field.intaVkSamplerAddressModevalue specifying the addressing mode for V coordinates outside[0,1).addressModeV(int value) Sets the specified value to theaddressModeV()field.intaVkSamplerAddressModevalue specifying the addressing mode for W coordinates outside[0,1).addressModeW(int value) Sets the specified value to theaddressModeW()field.booleanTRUEto enable anisotropic filtering, as described in the Texel Anisotropic Filtering section, orFALSEotherwise.anisotropyEnable(boolean value) Sets the specified value to theanisotropyEnable()field.intaVkBorderColorvalue specifying the predefined border color to use.borderColor(int value) Sets the specified value to theborderColor()field.static VkSamplerCreateInfocalloc()Returns a newVkSamplerCreateInfoinstance allocated withmemCalloc.static VkSamplerCreateInfo.Buffercalloc(int capacity) Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemCalloc.static VkSamplerCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSamplerCreateInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSamplerCreateInfoDeprecated.static VkSamplerCreateInfo.BuffercallocStack(int capacity) Deprecated.static VkSamplerCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkSamplerCreateInfocallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.booleancompareEnable(boolean value) Sets the specified value to thecompareEnable()field.intaVkCompareOpvalue specifying the comparison operator to apply to fetched data before filtering as described in the Depth Compare Operation section.compareOp(int value) Sets the specified value to thecompareOp()field.static VkSamplerCreateInfocreate()Returns a newVkSamplerCreateInfoinstance allocated withBufferUtils.static VkSamplerCreateInfo.Buffercreate(int capacity) Returns a newVkSamplerCreateInfo.Bufferinstance allocated withBufferUtils.static VkSamplerCreateInfocreate(long address) Returns a newVkSamplerCreateInfoinstance for the specified memory address.static VkSamplerCreateInfo.Buffercreate(long address, int capacity) Create aVkSamplerCreateInfo.Bufferinstance at the specified memory.static @Nullable VkSamplerCreateInfocreateSafe(long address) static @Nullable VkSamplerCreateInfo.BuffercreateSafe(long address, int capacity) intflags()a bitmask ofVkSamplerCreateFlagBitsdescribing additional parameters of the sampler.flags(int value) Sets the specified value to theflags()field.intaVkFiltervalue specifying the magnification filter to apply to lookups.magFilter(int value) Sets the specified value to themagFilter()field.static VkSamplerCreateInfomalloc()Returns a newVkSamplerCreateInfoinstance allocated withmemAlloc.static VkSamplerCreateInfo.Buffermalloc(int capacity) Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemAlloc.static VkSamplerCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkSamplerCreateInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStack.static VkSamplerCreateInfoDeprecated.static VkSamplerCreateInfo.BuffermallocStack(int capacity) Deprecated.static VkSamplerCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkSamplerCreateInfomallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.floatthe anisotropy value clamp used by the sampler whenanisotropyEnableisTRUE.maxAnisotropy(float value) Sets the specified value to themaxAnisotropy()field.floatmaxLod()used to clamp the maximum of the computed LOD value.maxLod(float value) Sets the specified value to themaxLod()field.intaVkFiltervalue specifying the minification filter to apply to lookups.minFilter(int value) Sets the specified value to theminFilter()field.floatminLod()used to clamp the minimum of the computed LOD value.minLod(float value) Sets the specified value to theminLod()field.floatthe 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.mipLodBias(float value) Sets the specified value to themipLodBias()field.intaVkSamplerMipmapModevalue specifying the mipmap filter to apply to lookups.mipmapMode(int value) Sets the specified value to themipmapMode()field.static intnaddressModeU(long struct) Unsafe version ofaddressModeU().static voidnaddressModeU(long struct, int value) Unsafe version ofaddressModeU.static intnaddressModeV(long struct) Unsafe version ofaddressModeV().static voidnaddressModeV(long struct, int value) Unsafe version ofaddressModeV.static intnaddressModeW(long struct) Unsafe version ofaddressModeW().static voidnaddressModeW(long struct, int value) Unsafe version ofaddressModeW.static intnanisotropyEnable(long struct) Unsafe version ofanisotropyEnable().static voidnanisotropyEnable(long struct, int value) Unsafe version ofanisotropyEnable.static intnborderColor(long struct) Unsafe version ofborderColor().static voidnborderColor(long struct, int value) Unsafe version ofborderColor.static intncompareEnable(long struct) Unsafe version ofcompareEnable().static voidncompareEnable(long struct, int value) Unsafe version ofcompareEnable.static intncompareOp(long struct) Unsafe version ofcompareOp().static voidncompareOp(long struct, int value) Unsafe version ofcompareOp.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static intnmagFilter(long struct) Unsafe version ofmagFilter().static voidnmagFilter(long struct, int value) Unsafe version ofmagFilter.static floatnmaxAnisotropy(long struct) Unsafe version ofmaxAnisotropy().static voidnmaxAnisotropy(long struct, float value) Unsafe version ofmaxAnisotropy.static floatnmaxLod(long struct) Unsafe version ofmaxLod().static voidnmaxLod(long struct, float value) Unsafe version ofmaxLod.static intnminFilter(long struct) Unsafe version ofminFilter().static voidnminFilter(long struct, int value) Unsafe version ofminFilter.static floatnminLod(long struct) Unsafe version ofminLod().static voidnminLod(long struct, float value) Unsafe version ofminLod.static floatnmipLodBias(long struct) Unsafe version ofmipLodBias().static voidnmipLodBias(long struct, float value) Unsafe version ofmipLodBias.static intnmipmapMode(long struct) Unsafe version ofmipmapMode().static voidnmipmapMode(long struct, int value) Unsafe version ofmipmapMode.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.static intnunnormalizedCoordinates(long struct) Unsafe version ofunnormalizedCoordinates().static voidnunnormalizedCoordinates(long struct, int value) Unsafe version ofunnormalizedCoordinates.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkOpaqueCaptureDescriptorDataCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkSamplerBlockMatchWindowCreateInfoQCOMvalue to thepNextchain.Prepends the specifiedVkSamplerBorderColorComponentMappingCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkSamplerCubicWeightsCreateInfoQCOMvalue to thepNextchain.Prepends the specifiedVkSamplerCustomBorderColorCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkSamplerReductionModeCreateInfovalue to thepNextchain.Prepends the specifiedVkSamplerReductionModeCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkSamplerYcbcrConversionInfovalue to thepNextchain.Prepends the specifiedVkSamplerYcbcrConversionInfoKHRvalue to thepNextchain.set(int sType, long pNext, int flags, int magFilter, int minFilter, int mipmapMode, int addressModeU, int addressModeV, int addressModeW, float mipLodBias, boolean anisotropyEnable, float maxAnisotropy, boolean compareEnable, int compareOp, float minLod, float maxLod, int borderColor, boolean unnormalizedCoordinates) Initializes this struct with the specified values.set(VkSamplerCreateInfo src) Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_SAMPLER_CREATE_INFOvalue to thesType()field.booleancontrols whether to use unnormalized or normalized texel coordinates to address texels of the image.unnormalizedCoordinates(boolean value) Sets the specified value to theunnormalizedCoordinates()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
MAGFILTER
public static final int MAGFILTERThe struct member offsets. -
MINFILTER
public static final int MINFILTERThe struct member offsets. -
MIPMAPMODE
public static final int MIPMAPMODEThe struct member offsets. -
ADDRESSMODEU
public static final int ADDRESSMODEUThe struct member offsets. -
ADDRESSMODEV
public static final int ADDRESSMODEVThe struct member offsets. -
ADDRESSMODEW
public static final int ADDRESSMODEWThe struct member offsets. -
MIPLODBIAS
public static final int MIPLODBIASThe struct member offsets. -
ANISOTROPYENABLE
public static final int ANISOTROPYENABLEThe struct member offsets. -
MAXANISOTROPY
public static final int MAXANISOTROPYThe struct member offsets. -
COMPAREENABLE
public static final int COMPAREENABLEThe struct member offsets. -
COMPAREOP
public static final int COMPAREOPThe struct member offsets. -
MINLOD
public static final int MINLODThe struct member offsets. -
MAXLOD
public static final int MAXLODThe struct member offsets. -
BORDERCOLOR
public static final int BORDERCOLORThe struct member offsets. -
UNNORMALIZEDCOORDINATES
public static final int UNNORMALIZEDCOORDINATESThe struct member offsets.
-
-
Constructor Details
-
VkSamplerCreateInfo
Creates aVkSamplerCreateInfoinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkSamplerCreateInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
flags
public int flags()a bitmask ofVkSamplerCreateFlagBitsdescribing additional parameters of the sampler. -
magFilter
public int magFilter()aVkFiltervalue specifying the magnification filter to apply to lookups. -
minFilter
public int minFilter()aVkFiltervalue specifying the minification filter to apply to lookups. -
mipmapMode
public int mipmapMode()aVkSamplerMipmapModevalue specifying the mipmap filter to apply to lookups. -
addressModeU
public int addressModeU()aVkSamplerAddressModevalue specifying the addressing mode for U coordinates outside[0,1). -
addressModeV
public int addressModeV()aVkSamplerAddressModevalue specifying the addressing mode for V coordinates outside[0,1). -
addressModeW
public int addressModeW()aVkSamplerAddressModevalue specifying the addressing mode for W coordinates outside[0,1). -
mipLodBias
public float mipLodBias()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. -
anisotropyEnable
public boolean anisotropyEnable()TRUEto enable anisotropic filtering, as described in the Texel Anisotropic Filtering section, orFALSEotherwise. -
maxAnisotropy
public float maxAnisotropy() -
compareEnable
public boolean compareEnable() -
compareOp
public int compareOp()aVkCompareOpvalue specifying the comparison operator to apply to fetched data before filtering as described in the Depth Compare Operation section. -
minLod
public float minLod()used to clamp the minimum of the computed LOD value. -
maxLod
public float maxLod()used to clamp the maximum of the computed LOD value. To avoid clamping the maximum value, setmaxLodto the constantLOD_CLAMP_NONE. -
borderColor
public int borderColor()aVkBorderColorvalue specifying the predefined border color to use. -
unnormalizedCoordinates
public boolean unnormalizedCoordinates()controls whether to use unnormalized or normalized texel coordinates to address texels of the image. WhenunnormalizedCoordinatesisTRUE, the range of the image coordinates used to lookup the texel is in the range of zero to the image size in each dimension. WhenunnormalizedCoordinatesisFALSE, the range of image coordinates is zero to one.When
unnormalizedCoordinatesisTRUE, images the sampler is used with in the shader have the following requirements:- The
viewTypemust be eitherIMAGE_VIEW_TYPE_1DorIMAGE_VIEW_TYPE_2D. - The image view must have a single layer and a single mip level.
When
unnormalizedCoordinatesisTRUE, 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.
- The
-
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_SAMPLER_CREATE_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkOpaqueCaptureDescriptorDataCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerBlockMatchWindowCreateInfoQCOMvalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerBorderColorComponentMappingCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerCubicWeightsCreateInfoQCOMvalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerCustomBorderColorCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerReductionModeCreateInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerReductionModeCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerYcbcrConversionInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkSamplerYcbcrConversionInfoKHRvalue to thepNextchain. -
flags
Sets the specified value to theflags()field. -
magFilter
Sets the specified value to themagFilter()field. -
minFilter
Sets the specified value to theminFilter()field. -
mipmapMode
Sets the specified value to themipmapMode()field. -
addressModeU
Sets the specified value to theaddressModeU()field. -
addressModeV
Sets the specified value to theaddressModeV()field. -
addressModeW
Sets the specified value to theaddressModeW()field. -
mipLodBias
Sets the specified value to themipLodBias()field. -
anisotropyEnable
Sets the specified value to theanisotropyEnable()field. -
maxAnisotropy
Sets the specified value to themaxAnisotropy()field. -
compareEnable
Sets the specified value to thecompareEnable()field. -
compareOp
Sets the specified value to thecompareOp()field. -
minLod
Sets the specified value to theminLod()field. -
maxLod
Sets the specified value to themaxLod()field. -
borderColor
Sets the specified value to theborderColor()field. -
unnormalizedCoordinates
Sets the specified value to theunnormalizedCoordinates()field. -
set
public VkSamplerCreateInfo set(int sType, long pNext, int flags, int magFilter, int minFilter, int mipmapMode, int addressModeU, int addressModeV, int addressModeW, float mipLodBias, boolean anisotropyEnable, float maxAnisotropy, boolean compareEnable, int compareOp, float minLod, float maxLod, int borderColor, boolean unnormalizedCoordinates) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkSamplerCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkSamplerCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkSamplerCreateInfoinstance allocated withBufferUtils. -
create
Returns a newVkSamplerCreateInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkSamplerCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkSamplerCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkSamplerCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkSamplerCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkSamplerCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkSamplerCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkSamplerCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
nmagFilter
public static int nmagFilter(long struct) Unsafe version ofmagFilter(). -
nminFilter
public static int nminFilter(long struct) Unsafe version ofminFilter(). -
nmipmapMode
public static int nmipmapMode(long struct) Unsafe version ofmipmapMode(). -
naddressModeU
public static int naddressModeU(long struct) Unsafe version ofaddressModeU(). -
naddressModeV
public static int naddressModeV(long struct) Unsafe version ofaddressModeV(). -
naddressModeW
public static int naddressModeW(long struct) Unsafe version ofaddressModeW(). -
nmipLodBias
public static float nmipLodBias(long struct) Unsafe version ofmipLodBias(). -
nanisotropyEnable
public static int nanisotropyEnable(long struct) Unsafe version ofanisotropyEnable(). -
nmaxAnisotropy
public static float nmaxAnisotropy(long struct) Unsafe version ofmaxAnisotropy(). -
ncompareEnable
public static int ncompareEnable(long struct) Unsafe version ofcompareEnable(). -
ncompareOp
public static int ncompareOp(long struct) Unsafe version ofcompareOp(). -
nminLod
public static float nminLod(long struct) Unsafe version ofminLod(). -
nmaxLod
public static float nmaxLod(long struct) Unsafe version ofmaxLod(). -
nborderColor
public static int nborderColor(long struct) Unsafe version ofborderColor(). -
nunnormalizedCoordinates
public static int nunnormalizedCoordinates(long struct) Unsafe version ofunnormalizedCoordinates(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags. -
nmagFilter
public static void nmagFilter(long struct, int value) Unsafe version ofmagFilter. -
nminFilter
public static void nminFilter(long struct, int value) Unsafe version ofminFilter. -
nmipmapMode
public static void nmipmapMode(long struct, int value) Unsafe version ofmipmapMode. -
naddressModeU
public static void naddressModeU(long struct, int value) Unsafe version ofaddressModeU. -
naddressModeV
public static void naddressModeV(long struct, int value) Unsafe version ofaddressModeV. -
naddressModeW
public static void naddressModeW(long struct, int value) Unsafe version ofaddressModeW. -
nmipLodBias
public static void nmipLodBias(long struct, float value) Unsafe version ofmipLodBias. -
nanisotropyEnable
public static void nanisotropyEnable(long struct, int value) Unsafe version ofanisotropyEnable. -
nmaxAnisotropy
public static void nmaxAnisotropy(long struct, float value) Unsafe version ofmaxAnisotropy. -
ncompareEnable
public static void ncompareEnable(long struct, int value) Unsafe version ofcompareEnable. -
ncompareOp
public static void ncompareOp(long struct, int value) Unsafe version ofcompareOp. -
nminLod
public static void nminLod(long struct, float value) Unsafe version ofminLod. -
nmaxLod
public static void nmaxLod(long struct, float value) Unsafe version ofmaxLod. -
nborderColor
public static void nborderColor(long struct, int value) Unsafe version ofborderColor. -
nunnormalizedCoordinates
public static void nunnormalizedCoordinates(long struct, int value) Unsafe version ofunnormalizedCoordinates.
-