Class Foliage
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFLOATalpha below which a pixel of the texture is cut away.static final StringVEC3colour at the root of a blade of grass.static final StringFLOATsways per second.static final StringFLOAThow far a point one unit above the root bends, world units.static final StringVEC3colour at its tip.static final StringVEC2the direction the wind blows, in worldx/z. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShaderMaterialcanopy()A tree crown modelled as one solid shape (a ball or a block of leaves): leaf clusters from cellular noise, each cluster lit as a bump of its own, crevices between clusters darkened, the underside in shade, sunlight glowing through the rim seen against the sun, and a gentle sway.static ShaderMaterialgrass()Grass blades: a root to tip gradient along the texture's v (0 at the root), wind, and a sheen toward the sun.static ShaderMaterialleaves()Leaf cards: wind sway, the texture's alpha cut out, and sunlight glowing through leaves seen against the sun.static ShaderMaterialwind()Wind sway alone; the surface keeps its own colour and texture.
-
Field Details
-
WIND
-
STRENGTH
FLOAThow far a point one unit above the root bends, world units.- See Also:
-
SPEED
-
CUTOFF
FLOATalpha below which a pixel of the texture is cut away.- See Also:
-
ROOT
-
TIP
-
-
Method Details
-
wind
Wind sway alone; the surface keeps its own colour and texture.
Returns
a new shader material
-
leaves
Leaf cards: wind sway, the texture's alpha cut out, and sunlight glowing through leaves seen against the sun.
Returns
a new shader material
-
canopy
A tree crown modelled as one solid shape (a ball or a block of leaves): leaf clusters from cellular noise, each cluster lit as a bump of its own, crevices between clusters darkened, the underside in shade, sunlight glowing through the rim seen against the sun, and a gentle sway. The instance colour is the foliage tint, so a creator's green, autumn orange or blossom pink is kept.
Returns
a new shader material
-
grass
Grass blades: a root to tip gradient along the texture's v (0 at the root), wind, and a sheen toward the sun. Pair with instancing or a field of crossed quads.
Returns
a new shader material
-