Enum Class Transparency

java.lang.Object
java.lang.Enum<Transparency>
dev.engine_room.flywheel.api.material.Transparency
All Implemented Interfaces:
Serializable, Comparable<Transparency>, Constable

public enum Transparency extends Enum<Transparency>
  • Enum Constant Details

    • OPAQUE

      public static final Transparency OPAQUE
      No blending. Used for solid and cutout geometry.
    • ADDITIVE

      public static final Transparency ADDITIVE
      Additive blending.

      Each fragment blends color and alpha with the following equation:

       
       out = src + dst
       
       
    • LIGHTNING

      public static final Transparency LIGHTNING
      Lightning transparency.

      Each fragment blends color and alpha with the following equation:

       
       out = src * alpha_src + dst
       
       
    • GLINT

      public static final Transparency GLINT
      Glint transparency. Used for the enchantment effect.

      Each fragment blends with the following equations:

       
       color_out = color_src^2 + color_dst
       alpha_out = alpha_dst
       
       
    • CRUMBLING

      public static final Transparency CRUMBLING
      Crumbling transparency. Used for the block breaking overlay.

      Each fragment blends with the following equations:

       
       color_out = 2 * color_src * color_dst
       alpha_out = alpha_src
       
       
    • TRANSLUCENT

      public static final Transparency TRANSLUCENT
      Translucent transparency.

      Each fragment blends with the following equations:

       
       color_out = color_src * alpha_src + color_dst * (1 - alpha_src)
       alpha_out = alpha_src + alpha_dst * (1 - alpha_src)
       
       
    • ORDER_INDEPENDENT

      public static final Transparency ORDER_INDEPENDENT
      If supported by the backend, this mode will use OIT that approximates TRANSLUCENT transparency.

      If a backend does not support OIT, it must treat this the same as TRANSLUCENT.

      It is recommended to use this option when possible, though for cases where blend modes are used as an overlay against solid geometry the order dependent modes are preferred.

  • Method Details

    • values

      public static Transparency[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Transparency valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null