Skip to Content
DocumentationFeaturesHue Shift

Hue Shift

Hue Shift rotates the surface’s hue in HSV space, keeping luminance and saturation intact while changing the color. It is the right tool for faction palettes, power-up cycles, and per-instance prop variation without authoring separate materials.

When to use it

  • Faction tinting — one material, any number of team colors, zero rebuilds.
  • Power-up effects — animate the hue while charging.
  • Procedural variation — randomize per instance via MaterialPropertyBlock.
  • Day/night atmosphere — sweep the hue with time of day.

How it works

Genesis converts the albedo to HSV via a fast YIQ approximation, adds _HueShift / 360.0 to the hue, and converts back. With _HueAnimateSpeed above zero, time is added to the shift, giving the moving-rainbow effect.

Properties

Inspector labelShader propertyTypeDefaultDescription
Hue Shift_HueShiftFloat (0–360)0.0Rotation in degrees.
Animate Speed_HueAnimateSpeedFloat (0–10)0.00 = static; higher rotates faster.
Hue Mask_HueMaskTexture2DwhiteMask restricting the shift to UV regions.
Affect Emission_HueAffectsEmissionToggleOffOff = albedo only, On = also shift emission.
Strength_HueStrengthFloat (0–1)1.0Blend amount against the original hue.

Usage

  1. Enable Hue Shift and set the Shift value in degrees.
  2. For faction colors, pass per-instance values via MaterialPropertyBlock to keep batching alive.
  3. For animated hues, set Animate Speed above 0; the shader handles time internally.
  4. Mask the shift to keep skin and eyes neutral while team-tinting armor.
var mpb = new MaterialPropertyBlock(); mpb.SetFloat("_HueShift", teamHueDegrees); // 0 red, 120 green, 240 blue renderer.SetPropertyBlock(mpb);

Tips & gotchas

  • Use a MaterialPropertyBlock for variation; material.SetFloat breaks SRP batching.
  • A hue shift on near-grey colors is invisible — saturation must be above zero, so pull from saturated source textures.
  • Pairs with Iridescence: iridescence handles view-angle color, hue handles time and per-instance variation.
  • Cost is roughly six ALU per pixel, cheap enough to ship.
Last updated on