Skip to Content
DocumentationFeaturesIridescence

Iridescence

Iridescence is the rainbow shimmer seen on bubbles, oil films, and beetle wings — color that changes with viewing angle rather than light direction. Genesis approximates it with a 1D ramp sampled by the Fresnel term, so the entire color cycle comes from a single texture.

Video

The camera orbiting an oil-slick sphere so the iridescent rainbow shifts across magenta, cyan, and yellow as the view angle changes while the light stays fixed.

features/iridescence/iridescence-orbit.mp4

View-angle rainbow shift on an oil-slick surface as the camera orbits.

When to use it

  • Oil slicks and soap bubbles — a full saturated rainbow.
  • Sci-fi armor — a subtle violet-to-cyan shift under specular.
  • Beetle shells and jewellery — high-saturation iridescent metals.
  • Stylized water highlights — colorful caustic flicker.

How it works

The shader computes 1 - dot(N, V), raises it to _IridescencePower, and uses the result as the X coordinate into _IridescenceRamp. The sampled color is blended over the surface by _IridescenceIntensity. An optional mask restricts the effect to specific UV regions.

Plain metallic surface with a single tint.

Rainbow shift along the grazing edges, brighter at low view angles.

Off
Iridescence · ramp

A plain metal surface against the same one with iridescence. Drag to compare.

Properties

Inspector labelShader propertyTypeDefaultDescription
Iridescence Ramp_IridescenceRampTexture2DNone1D ramp (256x4) sampled by view angle.
Intensity_IridescenceIntensityFloat (0–1)0.5Mix amount against the base lighting.
Power_IridescencePowerFloat (0.1–8)2.0Biases the Fresnel curve. Higher confines the rainbow to grazing angles.
Phase Shift_IridescenceShiftFloat (0–1)0.0Phase offset into the ramp. Animate for shimmer.
Iridescence Mask_IridescenceMaskTexture2DwhiteUV-space mask limiting the effect to regions.
Blend Mode_IridescenceBlendModeEnumAddAdd, Multiply, Screen, or Overlay.

Usage

  1. Author a ramp in the Ramp Creator. The classic oil-slick ramp runs magenta to cyan to yellow to magenta.
  2. Assign it and set Intensity to 0.3–0.5 for subtle, 1.0+ for full chroma.
  3. Use Power to control where the rainbow appears — 1 covers the whole surface, 5+ only the grazing edges.
  4. Animate Phase Shift from a script for a moving shimmer.
material.SetTexture("_IridescenceRamp", oilSlickRamp); material.SetFloat("_IridescenceIntensity", 0.4f); material.SetFloat("_IridescenceShift", Mathf.Repeat(Time.time * 0.2f, 1f));

Tips & gotchas

  • Use bilinear filtering with clamp wrap on the ramp to avoid hue seams at the edges.
  • Subtle reads better — 0.2–0.5 intensity is usually plenty; full strength looks like a bug.
  • Pairs with Specular: the rainbow tints the spec lobe naturally in Add or Overlay blend.
  • Cost is a single texture sample plus a lerp, so it is negligible on mobile.
Last updated on