27 float hue = kCoolHue + (kWarmHue + 256.0f - kCoolHue) * w;
28 hue += hueDrift * 256.0f;
37 static_cast<fl::u8>(kMinSpread + (kMaxSpread - kMinSpread) * a);
46 const float tt =
clampf(
t, 0.0f, 1.0f);
constexpr float kMinSpread
constexpr float kMaxSpread
MoodPalette paletteFor(const RoomSense &s, float hueDrift)
Derive the family for this frame. Cheap; call every frame.
float clampf(float v, float lo, float hi)
RGBf paletteColor(const MoodPalette &p, float t)
Colour at position t in [0, 1] along the family, at value v.
float arousal
0 calm .. 1 energetic
fl::u8 hueSpread
how far t=1 travels from t=0
float warmth
0 cool .. 1 warm, from valence
fl::u8 hueBase
centre of the family
Everything a visual is allowed to react to.
Linear-light float pixel, nominal range [0, 1], may exceed 1 before clip.