Class Toon
java.lang.Object
com.codename1.gpu.shaders.Toon
Stylized, non photographic shading. These compute their own lighting
from the sun, so use them on a
Material.Type.UNLIT material: the
material's colour and texture are the paint, the graph decides the light.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ShaderMaterialcel()Cel shading: light in hard bands with a thin soft step between them, a cool shadow tint and a bright rim.static ShaderMaterialhatching()Pen hatching: the darker the light, the more crossing lines, drawn in world space so they stay put as the camera moves.static ShaderMateriallowPoly()Flat faceted low poly look: one colour per face by height, toward the sun or away, with no smooth gradients.
-
Field Details
-
BANDS
-
SHADE
VEC3the colour of the shadowed side, multiplied into the paint.- See Also:
-
RIM
-
DENSITY
-
-
Method Details
-
cel
Cel shading: light in hard bands with a thin soft step between them, a cool shadow tint and a bright rim.
Returns
a new shader material
-
hatching
Pen hatching: the darker the light, the more crossing lines, drawn in world space so they stay put as the camera moves.
Returns
a new shader material
-
lowPoly
Flat faceted low poly look: one colour per face by height, toward the sun or away, with no smooth gradients.
Returns
a new shader material
-