Enum Class ShaderFeature

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

public enum ShaderFeature extends Enum<ShaderFeature>
Shader features allow a higher-level way of requesting GLSL functionality without having to manually enable extensions per-shader.
Since:
2.0.0
  • Enum Constant Details

    • COMPUTE

      public static final ShaderFeature COMPUTE
    • SHADER_STORAGE

      public static final ShaderFeature SHADER_STORAGE
    • ATOMIC_COUNTER

      public static final ShaderFeature ATOMIC_COUNTER
    • BINDLESS_TEXTURE

      public static final ShaderFeature BINDLESS_TEXTURE
    • CUBE_MAP_ARRAY

      public static final ShaderFeature CUBE_MAP_ARRAY
      Since:
      2.1.0
  • Field Details

    • FEATURES

      @Internal public static final ShaderFeature[] FEATURES
    • CODEC

      public static final com.mojang.serialization.Codec<ShaderFeature> CODEC
  • Method Details

    • values

      public static ShaderFeature[] 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 ShaderFeature 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
    • isSupported

      public boolean isSupported()
      Returns:
      Whether this feature is supported on this platform
    • getDefinitionName

      public String getDefinitionName()
      Returns:
      The shader definition name in GLSL code
    • modifyShader

      public void modifyShader(io.github.ocelot.glslprocessor.api.node.GlslTree tree)
      Modifies the specified shader source to add the required GLSL extensions.
      Parameters:
      tree - The tree to modify