Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public enum ShaderMaterial.Hook
- Object
- Enum<ShaderMaterial.Hook>
- ShaderMaterial.Hook
ImplementsComparable<ShaderMaterial.Hook>
An input of the engine’s shader that a graph can replace.
Enum constants
VERTEX_OFFSET | A VEC3 added to the model space vertex position. |
BASE_COLOR | The VEC4 surface colour and alpha, in place of the material colour times its texture. |
NORMAL | The VEC3 world space surface normal used for lighting; it is normalized for you. |
METALLIC | The FLOAT metallic factor of a PBR material. |
ROUGHNESS | The FLOAT roughness of a PBR material. |
EMISSIVE | A VEC3 colour added after lighting, before fog and tone mapping. |
DISCARD | A 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_OFFSETA
VEC3 added to the model space vertex position. Vertex stage.BASE_COLOR
BASE_COLORThe
VEC4 surface colour and alpha, in place of the material
colour times its texture.NORMAL
NORMALThe
VEC3 world space surface normal used for lighting; it is
normalized for you.METALLIC
METALLICThe
FLOAT metallic factor of a PBR material.ROUGHNESS
ROUGHNESSThe
FLOAT roughness of a PBR material.EMISSIVE
EMISSIVEA
VEC3 colour added after lighting, before fog and tone mapping.DISCARD
DISCARDA
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