Record Class SamplerDescriptor
java.lang.Object
java.lang.Record
dev.engine.graphics.sampler.SamplerDescriptor
- Record Components:
minFilter- minification filter (includes mipmap mode)magFilter- magnification filter (NEAREST or LINEAR only)wrapS- horizontal wrap modewrapT- vertical wrap modewrapR- depth/layer wrap mode (for 3D/cube/array textures)minLod- minimum level of detail (0.0 = highest resolution mip)maxLod- maximum level of detail (1000.0 = use all mips)lodBias- LOD bias added to the computed mip levelmaxAnisotropy- maximum anisotropy level (1.0 = disabled, 16.0 = max quality)compareFunc- comparison function for shadow samplers (null = disabled)borderColor- border color for CLAMP_TO_BORDER wrap mode
public record SamplerDescriptor(FilterMode minFilter, FilterMode magFilter, WrapMode wrapS, WrapMode wrapT, WrapMode wrapR, float minLod, float maxLod, float lodBias, float maxAnisotropy, CompareFunc compareFunc, BorderColor borderColor)
extends Record
Describes a GPU sampler configuration.
Covers all sampler features common to OpenGL, Vulkan, and WebGPU: filtering, wrapping, LOD control, anisotropy, comparison, and border color.
-
Constructor Summary
ConstructorsConstructorDescriptionSamplerDescriptor(FilterMode minFilter, FilterMode magFilter, WrapMode wrapS, WrapMode wrapT) Backward-compatible 4-arg constructor.SamplerDescriptor(FilterMode minFilter, FilterMode magFilter, WrapMode wrapS, WrapMode wrapT, WrapMode wrapR, float minLod, float maxLod, float lodBias, float maxAnisotropy, CompareFunc compareFunc, BorderColor borderColor) Creates an instance of aSamplerDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SamplerDescriptoranisotropic(float maxAnisotropy) Returns the value of theborderColorrecord component.Returns the value of thecompareFuncrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SamplerDescriptorlinear()floatlodBias()Returns the value of thelodBiasrecord component.Returns the value of themagFilterrecord component.floatReturns the value of themaxAnisotropyrecord component.floatmaxLod()Returns the value of themaxLodrecord component.Returns the value of theminFilterrecord component.floatminLod()Returns the value of theminLodrecord component.static SamplerDescriptornearest()static SamplerDescriptorshadow()final StringtoString()Returns a string representation of this record class.static SamplerDescriptorwithAnisotropy(float max) withBorderColor(BorderColor color) withCompare(CompareFunc func) withLodBias(float bias) withLodRange(float min, float max) wrapR()Returns the value of thewrapRrecord component.wrapS()Returns the value of thewrapSrecord component.wrapT()Returns the value of thewrapTrecord component.
-
Constructor Details
-
SamplerDescriptor
public SamplerDescriptor(FilterMode minFilter, FilterMode magFilter, WrapMode wrapS, WrapMode wrapT) Backward-compatible 4-arg constructor. -
SamplerDescriptor
public SamplerDescriptor(FilterMode minFilter, FilterMode magFilter, WrapMode wrapS, WrapMode wrapT, WrapMode wrapR, float minLod, float maxLod, float lodBias, float maxAnisotropy, CompareFunc compareFunc, BorderColor borderColor) Creates an instance of aSamplerDescriptorrecord class.- Parameters:
minFilter- the value for theminFilterrecord componentmagFilter- the value for themagFilterrecord componentwrapS- the value for thewrapSrecord componentwrapT- the value for thewrapTrecord componentwrapR- the value for thewrapRrecord componentminLod- the value for theminLodrecord componentmaxLod- the value for themaxLodrecord componentlodBias- the value for thelodBiasrecord componentmaxAnisotropy- the value for themaxAnisotropyrecord componentcompareFunc- the value for thecompareFuncrecord componentborderColor- the value for theborderColorrecord component
-
-
Method Details
-
linear
-
nearest
-
trilinear
-
anisotropic
-
shadow
-
withWrap
-
withAnisotropy
-
withLodRange
-
withLodBias
-
withCompare
-
withBorderColor
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
minFilter
-
magFilter
-
wrapS
-
wrapT
-
wrapR
-
minLod
-
maxLod
-
lodBias
-
maxAnisotropy
public float maxAnisotropy()Returns the value of themaxAnisotropyrecord component.- Returns:
- the value of the
maxAnisotropyrecord component
-
compareFunc
Returns the value of thecompareFuncrecord component.- Returns:
- the value of the
compareFuncrecord component
-
borderColor
Returns the value of theborderColorrecord component.- Returns:
- the value of the
borderColorrecord component
-