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.ADDalphaEquation- The alpha component equation. The default isShaderBlendMode.BlendEquation.ADDsrcColorFactor- The source color factor. The default isGlStateManager.SourceFactor.ONEdstColorFactor- The destination color factor. The default isGlStateManager.DestFactor.ONEsrcAlphaFactor- The source alpha factor. The default isGlStateManager.SourceFactor.ONEdstAlphaFactor- 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 enumPossible 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 aShaderBlendModerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealphaEquationrecord component.voidapply()Applies this blend mode.Returns the value of thecolorEquationrecord component.com.mojang.blaze3d.platform.GlStateManager.DestFactorReturns the value of thedstAlphaFactorrecord component.com.mojang.blaze3d.platform.GlStateManager.DestFactorReturns the value of thedstColorFactorrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.com.mojang.blaze3d.platform.GlStateManager.SourceFactorReturns the value of thesrcAlphaFactorrecord component.com.mojang.blaze3d.platform.GlStateManager.SourceFactorReturns the value of thesrcColorFactorrecord component.final StringtoString()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 aShaderBlendModerecord class.- Parameters:
colorEquation- the value for thecolorEquationrecord componentalphaEquation- the value for thealphaEquationrecord componentsrcColorFactor- the value for thesrcColorFactorrecord componentdstColorFactor- the value for thedstColorFactorrecord componentsrcAlphaFactor- the value for thesrcAlphaFactorrecord componentdstAlphaFactor- the value for thedstAlphaFactorrecord 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 thecolorEquationrecord component.- Returns:
- the value of the
colorEquationrecord component
-
alphaEquation
Returns the value of thealphaEquationrecord component.- Returns:
- the value of the
alphaEquationrecord component
-
srcColorFactor
public com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcColorFactor()Returns the value of thesrcColorFactorrecord component.- Returns:
- the value of the
srcColorFactorrecord component
-
dstColorFactor
public com.mojang.blaze3d.platform.GlStateManager.DestFactor dstColorFactor()Returns the value of thedstColorFactorrecord component.- Returns:
- the value of the
dstColorFactorrecord component
-
srcAlphaFactor
public com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcAlphaFactor()Returns the value of thesrcAlphaFactorrecord component.- Returns:
- the value of the
srcAlphaFactorrecord component
-
dstAlphaFactor
public com.mojang.blaze3d.platform.GlStateManager.DestFactor dstAlphaFactor()Returns the value of thedstAlphaFactorrecord component.- Returns:
- the value of the
dstAlphaFactorrecord component
-