Record Class ShaderBlendMode
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.program.ShaderBlendMode
- Record Components:
colorEquation
- The color component equation. The default isShaderBlendMode.BlendEquation.ADD
alphaEquation
- The alpha component equation. The default isShaderBlendMode.BlendEquation.ADD
srcColorFactor
- The source color factor. The default isGlStateManager.SourceFactor.ONE
dstColorFactor
- The destination color factor. The default isGlStateManager.DestFactor.ONE
srcAlphaFactor
- The source alpha factor. The default isGlStateManager.SourceFactor.ONE
dstAlphaFactor
- The destination alpha factor. The default isGlStateManager.DestFactor.ONE
public record ShaderBlendMode(ShaderBlendMode.BlendEquation colorEquation, ShaderBlendMode.BlendEquation alphaEquation, com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcColorFactor, com.mojang.blaze3d.platform.GlStateManager.DestFactor dstColorFactor, com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcAlphaFactor, com.mojang.blaze3d.platform.GlStateManager.DestFactor dstAlphaFactor)
extends Record
Specifies the blend mode for a
ShaderProgram
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Possible OpenGL blend equations. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ShaderBlendMode> static final com.mojang.serialization.Codec
<com.mojang.blaze3d.platform.GlStateManager.DestFactor> static final com.mojang.serialization.Codec
<com.mojang.blaze3d.platform.GlStateManager.SourceFactor> -
Constructor Summary
ConstructorsConstructorDescriptionShaderBlendMode
(ShaderBlendMode.BlendEquation colorEquation, ShaderBlendMode.BlendEquation alphaEquation, com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcColorFactor, com.mojang.blaze3d.platform.GlStateManager.DestFactor dstColorFactor, com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcAlphaFactor, com.mojang.blaze3d.platform.GlStateManager.DestFactor dstAlphaFactor) Creates an instance of aShaderBlendMode
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealphaEquation
record component.void
apply()
Applies this blend mode.Returns the value of thecolorEquation
record component.com.mojang.blaze3d.platform.GlStateManager.DestFactor
Returns the value of thedstAlphaFactor
record component.com.mojang.blaze3d.platform.GlStateManager.DestFactor
Returns the value of thedstColorFactor
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
final int
hashCode()
Returns a hash code value for this object.com.mojang.blaze3d.platform.GlStateManager.SourceFactor
Returns the value of thesrcAlphaFactor
record component.com.mojang.blaze3d.platform.GlStateManager.SourceFactor
Returns the value of thesrcColorFactor
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
SOURCE_FACTOR_CODEC
public static final com.mojang.serialization.Codec<com.mojang.blaze3d.platform.GlStateManager.SourceFactor> SOURCE_FACTOR_CODEC -
DESTINATION_FACTOR_CODEC
public static final com.mojang.serialization.Codec<com.mojang.blaze3d.platform.GlStateManager.DestFactor> DESTINATION_FACTOR_CODEC -
CODEC
-
-
Constructor Details
-
ShaderBlendMode
public ShaderBlendMode(ShaderBlendMode.BlendEquation colorEquation, ShaderBlendMode.BlendEquation alphaEquation, com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcColorFactor, com.mojang.blaze3d.platform.GlStateManager.DestFactor dstColorFactor, com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcAlphaFactor, com.mojang.blaze3d.platform.GlStateManager.DestFactor dstAlphaFactor) Creates an instance of aShaderBlendMode
record class.- Parameters:
colorEquation
- the value for thecolorEquation
record componentalphaEquation
- the value for thealphaEquation
record componentsrcColorFactor
- the value for thesrcColorFactor
record componentdstColorFactor
- the value for thedstColorFactor
record componentsrcAlphaFactor
- the value for thesrcAlphaFactor
record componentdstAlphaFactor
- the value for thedstAlphaFactor
record component
-
-
Method Details
-
apply
public void apply()Applies this blend mode. -
hasEquation
public boolean hasEquation()- Returns:
- Whether the blend equations have been changed from
ShaderBlendMode.BlendEquation.ADD
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
colorEquation
Returns the value of thecolorEquation
record component.- Returns:
- the value of the
colorEquation
record component
-
alphaEquation
Returns the value of thealphaEquation
record component.- Returns:
- the value of the
alphaEquation
record component
-
srcColorFactor
public com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcColorFactor()Returns the value of thesrcColorFactor
record component.- Returns:
- the value of the
srcColorFactor
record component
-
dstColorFactor
public com.mojang.blaze3d.platform.GlStateManager.DestFactor dstColorFactor()Returns the value of thedstColorFactor
record component.- Returns:
- the value of the
dstColorFactor
record component
-
srcAlphaFactor
public com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcAlphaFactor()Returns the value of thesrcAlphaFactor
record component.- Returns:
- the value of the
srcAlphaFactor
record component
-
dstAlphaFactor
public com.mojang.blaze3d.platform.GlStateManager.DestFactor dstAlphaFactor()Returns the value of thedstAlphaFactor
record component.- Returns:
- the value of the
dstAlphaFactor
record component
-