Performance Tips

intermediate performance

Global Dirt · Troubleshooting & FAQ

The core of Global Dirt is one full-screen aging stage (post-lit on Forward, GBuffer injection on Deferred); compare, anchoring, exclusions, object profiles and Forward Only Layers add their own small passes when enabled. The cost scales with what you enable, and the golden rule is: what is off costs nothing.

The free cases

  • Intensity at zero: the effect does not render at all. Not cheaper, free.
  • An effect at Strength zero: it is skipped entirely, pattern work included. The same goes for every variation slider.
  • Zones out of view: a zone outside the camera view is skipped, and so is a zone that changes nothing (no profile, no exclusion, Weight at 1).
  • Limit To Zones: pixels outside every zone leave the shader before any texture read, so the frame gets cheaper as the zones cover less of it. With no zone and no object profile in view, no pass is scheduled at all.
  • Profiles out of view: moss, metal aging and rust are shader variants. A zone or object profile that enables them does not compile them in, request normals or add draws for a camera that cannot see it.

Where the cost goes

  • Moss and rust are the heaviest effects: each one places its patches procedurally and then reads a bundled PBR surface set (color, normal and a packed mask) to give them material. If you need to trim cost, start there.
  • Quality adds pattern detail: Fast, Standard and High use one, two and three octaves for every enabled layer. Fast also drops the moss parallax and the moss micro shadows. High adds a stochastic breakup to the moss and rust surfaces, taking three samples instead of one, so it is the step that costs the most.
  • Cellular is the most expensive Color Variation pattern.
  • Rust drips walk up the surface looking for the rust that feeds them, extra placement samples per pixel. Drips at zero skips all of it, and so does any surface that faces up or down. Drip Length raises the number of steps along with the reach, and Quality caps it at 3, 6 or 12; a larger rust Size makes those steps longer, so fewer of them are needed.
  • Rust Relief at zero skips the rust normal map, one read per triplanar plane and per stochastic sample, so up to nine reads on High.
  • Metal aging is the cheap one of the two metal effects: it has no surface set to sample and no run-off, it only reshapes the substrate it finds.
  • Anchor Layers and Anchor Dirt draw the anchored objects one extra time. Anchor only what moves.
  • Object profiles add one carrier draw per included renderer, and each distinct profile takes one of the 16 slots. Sharing one profile between many renderers is free; giving each object its own is not.
  • Forward Only Layers add one extra pass on the Deferred path. Leave it empty when you do not need it.

Distance limits

The per-pixel details that cost the most carry their own Max Distance, in meters from the camera plane. Past it the shader skips that work and keeps the rest of the effect, so a wide shot still pays for the deposits but not for their relief.

  • Dirt Thickness Max Distance, 15 by default: further out the crust keeps its color and loses its rims and gaps.
  • Dust Settle Max Distance, 15: the edge softening fades over the last 30% of the range, so nothing pops at the limit.
  • Moss Relief Max Distance, 12, and Shadow Max Distance, 5: the parallax and the clump shadows are the two heaviest reads on moss.
  • Rust Relief Max Distance, 5: further out the rust normal map is not sampled.

The defaults sit where the detail normally stops being readable. Lower them for a camera that stays far from the surfaces and raise them for a first person view that walks up to a wall.

Recommended approach

Tune with the Compare split on, then lower each slider until just before you notice the difference. To actually remove an effect's work, take its Strength to zero: that skips it entirely, while lowering Coverage only changes the look. Profile on your target device with the usual tools (Frame Debugger and a GPU profiler) rather than in the editor.

Was this page helpful?