Skip to Content
DocumentationFeaturesWireframe

Wireframe

Wireframe draws an anti-aliased outline along each triangle edge using barycentric coordinates derived in the fragment stage. It needs no geometry shader, runs on every URP-supported platform, and pairs with Emission for glowing sci-fi grid materials.

Video

A low-poly mesh rotating with a glowing cyan emissive wireframe over every triangle edge and a dark semi-transparent fill, the edges blooming through a sci-fi grid look.

features/wireframe/wireframe-grid.mp4

An emissive barycentric wireframe over a rotating low-poly mesh.

When to use it

  • Debug visualization — verify mesh topology in-engine.
  • Sci-fi grid materials — holographic ships and virtual-world props.
  • Construction previews in strategy games.
  • Stylized low-poly art — accentuate triangle edges.

How it works

Genesis writes a barycentric attribute per triangle vertex, then in the fragment stage computes the minimum barycentric and applies an anti-aliased smoothstep based on screen-space derivatives via fwidth(). No geometry shader and no mesh modification are needed.

A plain low-poly mesh with no triangle edges visible.

Every triangle edge glows cyan; the inside fades to a semi-transparent fill.

Off
Wireframe · cyan emission

A low-poly mesh with and without the wireframe overlay. Drag to compare.

Properties

Inspector labelShader propertyTypeDefaultDescription
Wire Color_WireframeColorColor (HDR)RGB(0.3, 0.9, 1.0)Wire tint. HDR for bloom.
Wire Width_WireframeWidthFloat (0.5–8)1.5Edge thickness in screen pixels.
Smoothness_WireframeSmoothnessFloat (0–4)1.0Anti-aliasing softness around the edge.
Fill Color_WireframeFillColorColorRGBA(0,0,0,0.2)Inside-triangle tint and alpha.
Fill From Albedo_WireframeFillFromAlbedoToggleOffUse the surface albedo as the fill.
Emissive_WireframeEmissiveFloat (0–8)1.0Multiplier on the wire; HDR for bloom.

Usage

  1. Enable Wireframe; the barycentric attribute is generated automatically.
  2. Set Wire Width in screen pixels (1.5 reads crisp, 3+ reads chunky).
  3. Pick wire and fill colors independently — for sci-fi, a cyan wire over a dark fill.
  4. For a debug overlay, enable Fill From Albedo to keep the surface readable beneath the wires.
material.SetColor("_WireframeColor", new Color(0.3f, 1.0f, 1.0f) * 3.0f); material.SetFloat("_WireframeWidth", 1.5f); material.SetFloat("_WireframeEmissive", 1.0f);

Tips & gotchas

  • It requires fwidth() derivatives — supported on every URP GPU, but verify on very old Android (PowerVR SGX) if you target it.
  • Triangle count matters: a 100k-tri mesh becomes mostly wire at any reasonable width, so use proxy meshes for huge wireframes.
  • Static batching merges meshes and can confuse barycentrics. Disable static batching on wireframe materials or use a unique submesh.
  • Pairs with Emission and Bloom — HDR wire tints sell the sci-fi grid look.
  • Emission — feeds bloom for glowing wires.
  • Outline — silhouette stroke alongside wireframe.
  • Hologram — wireframe plus holo gives the full sci-fi look.
  • Rendering Modes — pair with Unlit for pure-grid materials.
Last updated on