Enum Material.Type

java.lang.Object
java.lang.Enum<Material.Type>
com.codename1.gpu.Material.Type
All Implemented Interfaces:
Comparable<Material.Type>
Enclosing class:
Material

public static enum Material.Type extends Enum<Material.Type>
The built in lighting model used to shade a surface.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Diffuse only (Lambert) lighting using a single directional light.
    Physically based shading (metallic/roughness with a GGX specular lobe, the model glTF describes) using the directional light, the environment's hemisphere ambient and, when the light casts them, shadows.
    Diffuse and specular (Blinn-Phong) lighting using a single directional light and the shininess property.
    Unlit shading sampling a background cube/sky texture, rendered behind all other geometry.
    Unlit shading intended for screen aligned sprites and billboards.
    Flat, unlit shading.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    static Material.Type[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • UNLIT

      public static final Material.Type UNLIT
      Flat, unlit shading. The fragment color is the base color modulated by the texture and vertex color. Ideal for UI, sprites and emissive surfaces.
    • LAMBERT

      public static final Material.Type LAMBERT
      Diffuse only (Lambert) lighting using a single directional light.
    • PHONG

      public static final Material.Type PHONG
      Diffuse and specular (Blinn-Phong) lighting using a single directional light and the shininess property.
    • PBR

      public static final Material.Type PBR
      Physically based shading (metallic/roughness with a GGX specular lobe, the model glTF describes) using the directional light, the environment's hemisphere ambient and, when the light casts them, shadows. See setMetallic, setRoughness and setEmissive.
    • SPRITE

      public static final Material.Type SPRITE
      Unlit shading intended for screen aligned sprites and billboards.
    • SKYBOX

      public static final Material.Type SKYBOX
      Unlit shading sampling a background cube/sky texture, rendered behind all other geometry.
  • Method Details

    • values

      public static Material.Type[] 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 Material.Type 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