Tell a material which way the year is going, so it can decide whether a
half-turned leaf is spring green or autumn gold. Cheap enough to call every
frame; a no-op on a material with no foliage tint.
HexWorld does this for you whenever the season advances or is scrubbed.
Drive it yourself with seasons.phase if you are wiring materials by hand.
Parameters
material: Material
phase: number
Returns void
Example
seasons.advance(dt); for (constmatofmyFoliageMaterials) setSeasonPhase(mat, seasons.phase);
Tell a material which way the year is going, so it can decide whether a half-turned leaf is spring green or autumn gold. Cheap enough to call every frame; a no-op on a material with no foliage tint.
HexWorlddoes this for you whenever the season advances or is scrubbed. Drive it yourself withseasons.phaseif you are wiring materials by hand.