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

public enum ShaderMaterial.Hook

  1. Object
  2. Enum<ShaderMaterial.Hook>
  3. ShaderMaterial.Hook

ImplementsComparable<ShaderMaterial.Hook>

An input of the engine’s shader that a graph can replace.

Enum constants

VERTEX_OFFSETA VEC3 added to the model space vertex position.
BASE_COLORThe VEC4 surface colour and alpha, in place of the material colour times its texture.
NORMALThe VEC3 world space surface normal used for lighting; it is normalized for you.
METALLICThe FLOAT metallic factor of a PBR material.
ROUGHNESSThe FLOAT roughness of a PBR material.
EMISSIVEA VEC3 colour added after lighting, before fog and tone mapping.
DISCARDA FLOAT; the pixel is dropped where it is above 0.5.

Methods

public static ShaderMaterial.Hook[] values()
public static ShaderMaterial.Hook valueOf(String name)
public ShaderType getType()Returns the type a graph for this hook must have.
public boolean isFragment()Returns true for the fragment stage, false for the vertex stage.

Inherited methods

Enum constant details

VERTEX_OFFSET

VERTEX_OFFSET
A VEC3 added to the model space vertex position. Vertex stage.

BASE_COLOR

BASE_COLOR
The VEC4 surface colour and alpha, in place of the material colour times its texture.

NORMAL

NORMAL
The VEC3 world space surface normal used for lighting; it is normalized for you.

METALLIC

METALLIC
The FLOAT metallic factor of a PBR material.

ROUGHNESS

ROUGHNESS
The FLOAT roughness of a PBR material.

EMISSIVE

EMISSIVE
A VEC3 colour added after lighting, before fog and tone mapping.

DISCARD

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()

valueOf

public static ShaderMaterial.Hook valueOf(String name)

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