Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public enum Material.Type

  1. Object
  2. Enum<Material.Type>
  3. Material.Type

ImplementsComparable<Material.Type>

The built in lighting model used to shade a surface.

Enum constants

UNLITFlat, unlit shading.
LAMBERTDiffuse only (Lambert) lighting using a single directional light.
PHONGDiffuse and specular (Blinn-Phong) lighting using a single directional light and the shininess property.
PBRPhysically 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.
SPRITEUnlit shading intended for screen aligned sprites and billboards.
SKYBOXUnlit shading sampling a background cube/sky texture, rendered behind all other geometry.

Methods

public static Material.Type[] values()
public static Material.Type valueOf(String name)

Inherited methods

Enum constant details

UNLIT

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

LAMBERT
Diffuse only (Lambert) lighting using a single directional light.

PHONG

PHONG
Diffuse and specular (Blinn-Phong) lighting using a single directional light and the shininess property.

PBR

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

SPRITE
Unlit shading intended for screen aligned sprites and billboards.

SKYBOX

SKYBOX
Unlit shading sampling a background cube/sky texture, rendered behind all other geometry.

Method details

values

public static Material.Type[] values()

valueOf

public static Material.Type valueOf(String name)