Package limn.render3d
Record Class Sampler
java.lang.Object
java.lang.Record
limn.render3d.Sampler
public record Sampler(Sampler.Filter minFilter, Sampler.Filter magFilter, Sampler.Wrap wrapS, Sampler.Wrap wrapT, boolean mipmaps)
extends Record
How a texture is filtered and wrapped when sampled. Baked into the
GpuTexture at upload time (each texture object carries its own state;
no separate sampler objects yet). mipmaps builds and uses a mip chain
for minified sampling (trilinear when the min filter is Sampler.Filter.LINEAR).-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSampler(Sampler.Filter minFilter, Sampler.Filter magFilter, Sampler.Wrap wrapS, Sampler.Wrap wrapT, boolean mipmaps) Creates an instance of aSamplerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themagFilterrecord component.Returns the value of theminFilterrecord component.booleanmipmaps()Returns the value of themipmapsrecord component.static SamplerNearest, clamped, no mips: crisp texels for pixel-art / data textures.static Samplersmooth()Trilinear, repeating: the sensible default for tiling color maps.final StringtoString()Returns a string representation of this record class.wrapS()Returns the value of thewrapSrecord component.wrapT()Returns the value of thewrapTrecord component.
-
Constructor Details
-
Sampler
public Sampler(Sampler.Filter minFilter, Sampler.Filter magFilter, Sampler.Wrap wrapS, Sampler.Wrap wrapT, boolean mipmaps) Creates an instance of aSamplerrecord class.- Parameters:
minFilter- the value for theminFilterrecord componentmagFilter- the value for themagFilterrecord componentwrapS- the value for thewrapSrecord componentwrapT- the value for thewrapTrecord componentmipmaps- the value for themipmapsrecord component
-
-
Method Details
-
smooth
Trilinear, repeating: the sensible default for tiling color maps. -
pixelated
Nearest, clamped, no mips: crisp texels for pixel-art / data textures. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
minFilter
Returns the value of theminFilterrecord component.- Returns:
- the value of the
minFilterrecord component
-
magFilter
Returns the value of themagFilterrecord component.- Returns:
- the value of the
magFilterrecord component
-
wrapS
Returns the value of thewrapSrecord component.- Returns:
- the value of the
wrapSrecord component
-
wrapT
Returns the value of thewrapTrecord component.- Returns:
- the value of the
wrapTrecord component
-
mipmaps
public boolean mipmaps()Returns the value of themipmapsrecord component.- Returns:
- the value of the
mipmapsrecord component
-