Enum ShaderMaterial.Hook

java.lang.Object
java.lang.Enum<ShaderMaterial.Hook>
com.codename1.gpu.shader.ShaderMaterial.Hook
All Implemented Interfaces:
Comparable<ShaderMaterial.Hook>
Enclosing class:
ShaderMaterial

public static enum ShaderMaterial.Hook extends Enum<ShaderMaterial.Hook>
An input of the engine's shader that a graph can replace.
  • Enum Constant Details

    • VERTEX_OFFSET

      public static final ShaderMaterial.Hook VERTEX_OFFSET
      A VEC3 added to the model space vertex position. Vertex stage.
    • BASE_COLOR

      public static final ShaderMaterial.Hook BASE_COLOR
      The VEC4 surface colour and alpha, in place of the material colour times its texture.
    • NORMAL

      public static final ShaderMaterial.Hook NORMAL
      The VEC3 world space surface normal used for lighting; it is normalized for you.
    • METALLIC

      public static final ShaderMaterial.Hook METALLIC
      The FLOAT metallic factor of a PBR material.
    • ROUGHNESS

      public static final ShaderMaterial.Hook ROUGHNESS
      The FLOAT roughness of a PBR material.
    • EMISSIVE

      public static final ShaderMaterial.Hook EMISSIVE
      A VEC3 colour added after lighting, before fog and tone mapping.
    • DISCARD

      public static final ShaderMaterial.Hook DISCARD
      A FLOAT; the pixel is dropped where it is above 0.5. For cut outs such as leaves, or a dissolve.
  • Method Details

    • values

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

      public static ShaderMaterial.Hook valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getType

      public ShaderType getType()

      Returns the type a graph for this hook must have.

      Returns

      the type

    • isFragment

      public boolean isFragment()

      Returns true for the fragment stage, false for the vertex stage.

      Returns

      the stage