Record Class TextureFilter
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.texture.TextureFilter
- Record Components:
blur
- Whether to blur the imagemipmap
- Whether to respect the mipmap levels of the imageanisotropy
- Sets the anisotropic filtering value. Any value >1 is considered to be enabled. Set toFloat.MAX_VALUE
to set to the platform maximumcompareFunction
- The depth compare function to use ornull
for defaultwrapX
- The clamping for the X axis on the texturewrapY
- The clamping for the Y axis on the texturewrapZ
- The clamping for the Z axis on the textureedgeColor
- The color to get when sampling the texture out of bounds when usingTextureFilter.Wrap.CLAMP_TO_BORDER
edgeType
- The type of data the edge color should be referenced inseamless
- Whether the texture should be considered seamless if using a cubemap
public record TextureFilter(boolean blur, boolean mipmap, float anisotropy, @Nullable TextureFilter.CompareFunction compareFunction, TextureFilter.Wrap wrapX, TextureFilter.Wrap wrapY, TextureFilter.Wrap wrapZ, int edgeColor, TextureFilter.EdgeType edgeType, boolean seamless)
extends Record
Specifies the full texture filter state of a texture or sampler object.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Depth-texture compare functions.static enum
Edge color data types.static enum
Texture wrap modes. -
Field Summary
Modifier and TypeFieldDescriptionstatic final TextureFilter
static final com.mojang.serialization.Codec
<TextureFilter> static final TextureFilter
static final com.mojang.serialization.Codec
<TextureFilter> -
Constructor Summary
ConstructorDescriptionTextureFilter
(boolean blur, boolean mipmap, float anisotropy, @Nullable TextureFilter.CompareFunction compareFunction, TextureFilter.Wrap wrapX, TextureFilter.Wrap wrapY, TextureFilter.Wrap wrapZ, int edgeColor, TextureFilter.EdgeType edgeType, boolean seamless) Creates an instance of aTextureFilter
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of theanisotropy
record component.void
applyToTexture
(int texture) Applies the filtering options to the specified texture object.void
applyToTextureTarget
(int target) Applies the filtering options to the specified texture target.boolean
blur()
Returns the value of theblur
record component.@Nullable TextureFilter.CompareFunction
Returns the value of thecompareFunction
record component.int
Returns the value of theedgeColor
record component.edgeType()
Returns the value of theedgeType
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
int
boolean
mipmap()
Returns the value of themipmap
record component.boolean
seamless()
Returns the value of theseamless
record component.final String
toString()
Returns a string representation of this record class.wrapX()
Returns the value of thewrapX
record component.wrapY()
Returns the value of thewrapY
record component.wrapZ()
Returns the value of thewrapZ
record component.
-
Field Details
-
REPEAT_DEFAULT_CODEC
-
CLAMP_DEFAULT_CODEC
-
REPEAT
-
CLAMP
-
-
Constructor Details
-
TextureFilter
public TextureFilter(boolean blur, boolean mipmap, float anisotropy, @Nullable @Nullable TextureFilter.CompareFunction compareFunction, TextureFilter.Wrap wrapX, TextureFilter.Wrap wrapY, TextureFilter.Wrap wrapZ, int edgeColor, TextureFilter.EdgeType edgeType, boolean seamless) Creates an instance of aTextureFilter
record class.- Parameters:
blur
- the value for theblur
record componentmipmap
- the value for themipmap
record componentanisotropy
- the value for theanisotropy
record componentcompareFunction
- the value for thecompareFunction
record componentwrapX
- the value for thewrapX
record componentwrapY
- the value for thewrapY
record componentwrapZ
- the value for thewrapZ
record componentedgeColor
- the value for theedgeColor
record componentedgeType
- the value for theedgeType
record componentseamless
- the value for theseamless
record component
-
-
Method Details
-
minFilter
public int minFilter()- Returns:
- The OpenGl filter to use when making the image smaller (minification)
-
magFilter
public int magFilter()- Returns:
- The OpenGl filter to use when making the image larger (magnification)
-
applyToTextureTarget
public void applyToTextureTarget(int target) Applies the filtering options to the specified texture target.- Parameters:
target
- The target to apply filtering to
-
applyToTexture
public void applyToTexture(int texture) Applies the filtering options to the specified texture object. Only valid ifVeilRenderSystem.directStateAccessSupported()
istrue
.- Parameters:
texture
- The texture to apply filtering to
-
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 '=='. -
blur
public boolean blur()Returns the value of theblur
record component.- Returns:
- the value of the
blur
record component
-
mipmap
public boolean mipmap()Returns the value of themipmap
record component.- Returns:
- the value of the
mipmap
record component
-
anisotropy
public float anisotropy()Returns the value of theanisotropy
record component.- Returns:
- the value of the
anisotropy
record component
-
compareFunction
Returns the value of thecompareFunction
record component.- Returns:
- the value of the
compareFunction
record component
-
wrapX
Returns the value of thewrapX
record component.- Returns:
- the value of the
wrapX
record component
-
wrapY
Returns the value of thewrapY
record component.- Returns:
- the value of the
wrapY
record component
-
wrapZ
Returns the value of thewrapZ
record component.- Returns:
- the value of the
wrapZ
record component
-
edgeColor
public int edgeColor()Returns the value of theedgeColor
record component.- Returns:
- the value of the
edgeColor
record component
-
edgeType
Returns the value of theedgeType
record component.- Returns:
- the value of the
edgeType
record component
-
seamless
public boolean seamless()Returns the value of theseamless
record component.- Returns:
- the value of the
seamless
record component
-