A broadleaf tree: a bare trunk under a rounded canopy, merged into one
geometry with vertex colours so a single instanced draw covers both.
The split matters to more than the silhouette. attachSeasonalTint finds the
canopy by its colour and leaves the trunk alone (see FOLIAGE_GLSL), and
attachSnow weights its cap by how far each face turns skyward, so winter
lands on the crown and not the bark. Both fall out of the geometry — neither
needs a second material or a per-vertex mask.
Give the material vertexColors: true, and pass
BROADLEAF_CANOPY_COLOR (or your own foliageColor) as the tint's
summer reference.
A broadleaf tree: a bare trunk under a rounded canopy, merged into one geometry with vertex colours so a single instanced draw covers both.
The split matters to more than the silhouette.
attachSeasonalTintfinds the canopy by its colour and leaves the trunk alone (seeFOLIAGE_GLSL), andattachSnowweights its cap by how far each face turns skyward, so winter lands on the crown and not the bark. Both fall out of the geometry — neither needs a second material or a per-vertex mask.Give the material
vertexColors: true, and pass BROADLEAF_CANOPY_COLOR (or your ownfoliageColor) as the tint'ssummerreference.