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 is ShaderBlendMode.BlendEquation.ADD
alphaEquation - The alpha component equation. The default is ShaderBlendMode.BlendEquation.ADD
srcColorFactor - The source color factor. The default is GlStateManager.SourceFactor.ONE
dstColorFactor - The destination color factor. The default is GlStateManager.DestFactor.ONE
srcAlphaFactor - The source alpha factor. The default is GlStateManager.SourceFactor.ONE
dstAlphaFactor - The destination alpha factor. The default is GlStateManager.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.
  • 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

      public static final com.mojang.serialization.Codec<ShaderBlendMode> 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 a ShaderBlendMode record class.
      Parameters:
      colorEquation - the value for the colorEquation record component
      alphaEquation - the value for the alphaEquation record component
      srcColorFactor - the value for the srcColorFactor record component
      dstColorFactor - the value for the dstColorFactor record component
      srcAlphaFactor - the value for the srcAlphaFactor record component
      dstAlphaFactor - the value for the dstAlphaFactor 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • colorEquation

      public ShaderBlendMode.BlendEquation colorEquation()
      Returns the value of the colorEquation record component.
      Returns:
      the value of the colorEquation record component
    • alphaEquation

      public ShaderBlendMode.BlendEquation alphaEquation()
      Returns the value of the alphaEquation record component.
      Returns:
      the value of the alphaEquation record component
    • srcColorFactor

      public com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcColorFactor()
      Returns the value of the srcColorFactor record component.
      Returns:
      the value of the srcColorFactor record component
    • dstColorFactor

      public com.mojang.blaze3d.platform.GlStateManager.DestFactor dstColorFactor()
      Returns the value of the dstColorFactor record component.
      Returns:
      the value of the dstColorFactor record component
    • srcAlphaFactor

      public com.mojang.blaze3d.platform.GlStateManager.SourceFactor srcAlphaFactor()
      Returns the value of the srcAlphaFactor record component.
      Returns:
      the value of the srcAlphaFactor record component
    • dstAlphaFactor

      public com.mojang.blaze3d.platform.GlStateManager.DestFactor dstAlphaFactor()
      Returns the value of the dstAlphaFactor record component.
      Returns:
      the value of the dstAlphaFactor record component