Table of Contents

ID Map

Renders a per-object ID map by assigning each renderer a unique, deterministic color. Each object is filled with a solid color derived from its instance ID, making this map useful for object selection, masking, outlining, and other object-aware effects.

The color is computed on the CPU and passed to the shader via a material property block, ensuring consistency across frames without requiring per-pixel computation.

(This effect has no adjustable shader properties.)

How It Works

  • Each renderer’s InstanceID is hashed into a pseudo-random RGB color.
  • The hashing is deterministic: the same object will always receive the same color within a session.
  • The entire object is rendered with a constant color, producing flat, clearly segmented regions.
Tip
  • This map is ideal as an intermediate buffer for effects such as outlines, object highlighting, selection masks, or editor visualization tools.
  • Colors are not guaranteed to be perceptually distinct for very large numbers of objects, but collisions are rare for typical scene sizes.