Enum Class DynamicBufferType

java.lang.Object
java.lang.Enum<DynamicBufferType>
foundry.veil.api.client.render.dynamicbuffer.DynamicBufferType
All Implemented Interfaces:
Serializable, Comparable<DynamicBufferType>, Constable

public enum DynamicBufferType extends Enum<DynamicBufferType>
Built-in dynamic buffers available to sample from.
  • Enum Constant Details

  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<DynamicBufferType> CODEC
    • PACKED_LIST_CODEC

      public static final com.mojang.serialization.Codec<Integer> PACKED_LIST_CODEC
  • Method Details

    • values

      public static DynamicBufferType[] 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 DynamicBufferType 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
    • getName

      public String getName()
      Returns:
      The code name of this type
    • getSourceName

      public String getSourceName()
      Returns:
      The name of this type inside the GLSL file
    • getOutputDeclaration

      public String getOutputDeclaration(int location)
      Parameters:
      location - The location to output to
      Returns:
      The full fragment shader output declaration for this buffer type
      Since:
      2.3.0
    • getType

      public io.github.ocelot.glslprocessor.api.grammar.GlslTypeSpecifier.BuiltinType getType()
      Returns:
      The data type stored in this buffer
    • getTypeGlsl

      public String getTypeGlsl()
      Returns:
      The GLSL source code for the fragment shader output
      Since:
      2.3.0
    • getInternalFormat

      public int getInternalFormat()
      Returns:
      The OpenGL internal format of the texture
    • getTexelFormat

      public int getTexelFormat()
      Returns:
      The OpenGL format of data assigned to the texture
    • getMask

      public int getMask()
      Returns:
      The bit mask of this type
    • getMacroName

      public String getMacroName()
      Returns:
      The name of the macro added when this buffer type is enabled
      Since:
      2.3.0
    • addMacros

      public static void addMacros(int mask, Map<String,String> map)
      Adds the standard buffer macros to the specified map.
      Parameters:
      mask - The mask of enabled buffers
      map - The map to add macros to
    • encode

      public static int encode(DynamicBufferType... types)
      Encodes the specified dynamic buffer types as a bit mask.
      Parameters:
      types - The types to encode
      Returns:
      An integer representing those buffer types
    • decode

      public static DynamicBufferType[] decode(int mask)
      Decodes the dynamic buffer types from the specified mask.
      The returned values are in the correct attachment order starting at attachment 1. Attachment 0 will always be the regular vanilla minecraft framebuffer attachment.
      Parameters:
      mask - The mask of buffers
      Returns:
      An array of all decoded buffers