Skip to Content
DocumentationFeaturesVertex Colors

Vertex Colors

Vertex colors are the cheapest per-pixel mask you can ship: data painted in your DCC tool, stored on the mesh, and read for free during the vertex stage. Genesis exposes them as tints, layer masks, vertex-animation amplitude, and dissolve gradients.

When to use it

  • Layer masks — paint moss, dirt, or snow weights in Blender or Polybrush.
  • Wind amplitude — store sway strength per vertex on foliage.
  • Tint variation — randomize prop colors without instancing.
  • Dissolve gradients — control the dissolve direction from per-vertex data.

How it works

Genesis reads the vertex color in the vertex stage, optionally selects a channel via _VertexColorChannel, and forwards it to the fragment for masking or to the vertex-animation evaluator for amplitude. No texture sample is required.

Properties

Inspector labelShader propertyTypeDefaultDescription
Use Vertex Color_UseVertexColorToggleOffMaster toggle.
Channel_VertexColorChannelEnumRGBRGB tint, R/G/B/A mask, or RGBA composite.
Mode_VertexColorModeEnumTintTint, LayerMask, WindAmplitude, or DissolveDriver.
Strength_VertexColorStrengthFloat (0–1)1.0Blend amount against the unaffected value.
Bias_VertexColorBiasFloat (-1–1)0.0Constant added before strength.

Usage

  1. Paint vertex colors in Blender (a vertex color layer), Maya (a color set), or Polybrush.
  2. Confirm the mesh has them: select the asset and look for “Has Vertex Colors” in the Mesh Info.
  3. In Genesis, enable Use Vertex Color and pick the channel and mode.
  4. For wind, set Mode to WindAmplitude and paint the sway strength directly on the mesh.
material.SetFloat("_UseVertexColor", 1f); material.SetFloat("_VertexColorChannel", 0); // R material.SetFloat("_VertexColorMode", 2); // WindAmplitude

Tips & gotchas

  • Unity primitives have no vertex colors; only imported or painted meshes do.
  • Vertex color interpolates across the triangle, so masks soften by triangle size. Subdivide for sharper masks.
  • Vertex colors are not gamma-corrected. In a linear project, the values you painted are the values you get.
  • Static batching strips per-renderer colors — use GPU instancing for unique tints per instance.
Last updated on