Mastodon
Built-in (BRP) URP HDRP

Overview

Add one component. Assign a profile. The object has an outline. That is the whole setup — for a mesh and for a sprite alike — and everything below is what happens once you want more than the default.

Your material is never touched. Keyline does not swap the shader on your renderer, does not require a particular one, and does not add a pass to it. The outline is drawn from a separate hull with its own material, so your objects keep whatever they had — Lit, Shader Graph, a third-party toon shader, a character carrying a stack of custom passes. Nothing has to be re-authored to become outlinable, and removing the component leaves the object exactly as it was.

It is a per-object effect, not a fullscreen one. You can outline a single enemy through a wall in orange while a pickup two metres away pulses green, and everything without the component stays untouched. X-Ray decides per object which layers it is allowed to show through — glass only, walls only, or both — so one prop can be seen through a window and its neighbour through nothing at all. That is the trade against a post-process edge detector, which sees the whole frame at once and gives every edge in it the same weight.

Sprites are first-class in 1.2.0. Keyline Outline 2D gives a SpriteRenderer the same profiles, the same fifteen styles and the same passes, with the rim measured from a distance field baked out of the artwork — so it follows what is drawn, holes included. Pixel art gets its own field mode: the edge lands on texel boundaries, corners come out square, and the width is counted in whole texels of the source at any zoom and any Pixels Per Unit.

The part that is genuinely hard to write yourself is the hull. Flat leaves, single-sided cards and thin prongs turn into blades under a naive normal-based extrusion. Mixed mode decides per face whether to follow the surface normal or stay in the plane; Sheet Solidify gives a flat island enough thickness to hold a rim. Stretch the model to a non-uniform scale and the outline and its style keep their proportions. The same component covers a static prop, a skinned character, a foliage card and a texture-cut decal — it picks the hull it can build from the mesh in front of it.

Fifteen styles, and every one of them is tunable and works on every pass — rim, X-Ray, fill — on meshes, sprites and cutouts. Each pass picks its own blend mode, so the same colour reads as light over a dark scene and as ink over a bright one; Single Layer paints each pixel once where a hull folds over itself; adjustable edge softness smooths any style, with a stepped variant for pixel art.

URP and HDRP live in the same package and are selected automatically by the pipeline tag. A hard-edged outline needs no renderer feature, no prepass and no project setting; the optional Soft Edge pass is added and removed in one click. A Light shader profile is included for mobile.

Key features

  • Per-object passes — outer rim, X-Ray rim for when the object is hidden, interior fill, and X-Ray interior fill, plus an optional cutout overlay on meshes. Each carries its own complete profile.
  • Fifteen outline styles, every one of them tunable: Solid, Neon, Halo, Sketch, Pattern, Double, Electric, Rainbow, Gradient, Frost, Lava, Smoke, Crystal, Water, Fire.
  • Sprites are first-class: Keyline Outline 2D gives a SpriteRenderer the same profiles, styles and passes, with the rim measured from a distance field baked out of the artwork rather than from an extruded hull — so it follows what is drawn, holes included. Sprite Atlas and per-frame fields for animation clips are supported.
  • Pixel art is a first-class case: the sprite's distance field can be baked on the texel grid instead, so the edge lands on texel boundaries, corners come out square, and the width is counted in whole texels of the source — two texels of outline at any zoom and any Pixels Per Unit.
  • X-Ray layer filtering: each component names the Unity layers its X-Ray may show through — glass only, walls only, both — and two objects behind the same wall can disagree. Costs nothing until a mask is actually narrowed.
  • Seven blend modes plus Default, per pass — Alpha, Additive, Multiply, Screen, Lighten, Darken, Subtract — so the same colour can be laid over the frame as light, as ink, or as ordinary transparency.
  • Single Layer: where a hull folds over itself, paint the pixel once instead of twice — for the styles where the overlap is a defect, not the look.
  • Adjustable edge softness on every style and every pass, with a stepped ring-by-ring falloff for pixel art. On meshes it rides on the optional Soft Edge pass, added and removed in one click; without it the component behaves exactly as before, hard-edged and with nothing to install.
  • Hard-mesh handling — Mixed expand decides per face which rule applies, Sheet Solidify thickens flat islands enough to hold a rim.
  • Cutout from material alpha: the outline follows the shape the texture defines, not the one the mesh has, with double-sided rendering for every style and pass. Foliage cards, decals, sprites on quads.
  • Uniform scale handling: stretch the model and the outline and its style keep their proportions instead of stretching with it.
  • Merge groups draw several objects as one silhouette, explicitly or automatically, with no internal edges between them — and X-Ray unions across the group the same way.
  • Skinned meshes follow the animation without re-baking per frame — all passes, on a rigged character.
  • Width in world units, in constant screen pixels, or in texels of the source sprite, whichever the shot needs.
  • Draw Config exposes queue, ZTest, ZWrite, Cull, depth bias and stencil state per object instead of keeping them as constants.
  • Thirteen drop-in components for hover, selection, damage, gauges, waves and reveal — plus an arbiter that stops them fighting over the same object.
  • Instance override: profiles are shared by default, and an object forks its own private copy the moment it needs to differ.
  • Full scripting API, documented section by section in the manual.

Outline styles

Solid outline style
Solida clean, quiet rim. The one that fits realistic scenes without asking for attention.
Neon outline style
Neonan additive glow with its own shell, for sci-fi and night scenes.
Halo outline style
Haloa soft layered bloom around the silhouette, tunable down to a whisper.
Sketch outline style
Sketcha restless, sketchy line that keeps moving, for stylised and toon looks.
Pattern outline style
Pattern84 tileable textures projected onto the rim, with scale, contrast and scroll.
Double outline style
Doubletwo concentric rings with a real gap between them, held open by a mask.
Electric outline style
Electrica flickering bolt that reads as energy rather than as a line.
Rainbow outline style
Rainbowa hue sweep travelling vertically or around a centre, with its own saturation control.
Gradient outline style
Gradienttwo colours with independent alphas; the style everything else is built on — the waves, the gauges and the reveal all drive a Gradient underneath.
Frost outline style
Frosta sparkling shell with soft falloff, for ice, shields and status effects.
Lava outline style
Lavaa dark crust broken open on a moving core, lit from inside the cracks rather than by being orange.
Smoke outline style
Smokea billowing cloud that runs out along its drift instead of ending at an edge.
Crystal outline style
Crystala cut stone: flat facets each catching the light on their own, bright cut edges and dispersion between neighbours.
Water outline style
Watera surface flowing around the object, with caustics and sheen that brighten towards the crest and stop there.
Fire outline style
Firetongues rising off the silhouette, stretched along the rise and dying at a height you set.

What's included

  • Two outline shaders — Keyline/Outline (Full) and the Light profile for mobile — each carrying a SubShader per render pipeline, plus the hidden Soft Edge, X-Ray occluder and 2D occluder shaders behind them. No Shader Graph dependency.
  • Under Add Component ▸ Keyline: the mesh and sprite outline components, the two sprite occluders, Merge Group, Draw Config, and thirteen recipes in Runtime/Recipes/.
  • Sixteen ready-made profile assets — one per style, plus a Light profile for mobile.
  • 84 pattern textures (PNG, 256 × 256) for the Pattern style.
  • A ten-chapter demo scene, built entirely from script and safe to delete — meshes, skinned character, cutouts, sprites and pixel art.
  • Demo models, sprites and textures by Kenney (CC0).
  • A 17-section HTML manual with 39 illustrations, plus a quick start — both offline, inside the package.
  • README, CHANGELOG, License.txt and Third-Party Notices.txt at the package root.

Technical details

Outline styles15
Passes per objectrim, X-Ray rim, fill, X-Ray fill — plus an optional cutout overlay on meshes
Blend modes7 + Default, chosen per pass
Profile parameters110+ fields — the inspector shows only the ones the chosen style reads
Componentsmesh outline, sprite outline, 2 sprite occluders, merge group, draw config, 13 recipes
ShadersFull + Light outline shaders, Soft Edge, X-Ray occluders, 2D occluder — with shared .hlsl includes
Pattern textures84 · PNG · 256 × 256
Demo1 scene, 10 chapters
Batching400 outlined objects → 7 SRP batches
Allocation0 bytes per frame from the outline runtime
Render pipelinesURP 17.x and HDRP 17.x — one package
Sprite field modes3 — Smooth (Euclidean, sub-texel edge) and Pixel Art 8-way / 4-way (texel grid)
Width modesworld units, constant screen pixels, texels (sprites)

Requirements

  • Unity 6000.3 or newer.
  • Universal Render Pipeline 17.x or High Definition Render Pipeline 17.x — both ship in the same package and are selected automatically.
  • The Built-in Render Pipeline is NOT supported.
  • Tested on Windows (URP and HDRP), Android (Vulkan and OpenGLES3) and WebGL. Soft Edge switches itself off under single-pass stereo VR; outlines still render.

Tags

Shaders VFX Outline Highlight X-Ray 2D Sprite Pixel Art URP HDRP Mobile

Version history

v1.2.02026-09-14
  • SpriteRenderer support: Keyline Outline 2D with the same profiles, styles and passes, plus two components for declaring what counts as an occluder in a scene that has no depth of its own. Sprite Atlas (Full Rect) and per-frame fields for animation clips.
  • Pixel art fields: Field Mode bakes the sprite's field on the texel grid, with a diagonal costing one step (8-way) or two (4-way). The edge lands on texel boundaries, corners are square, and Width counts whole texels of the source. Rim Falloff fades the rim a whole ring at a time.
  • X-Ray layer filtering: each component names the layers its X-Ray may show through, and Transparent Occluder Layers lets glass and water count as occluders.
  • The cutout rim is measured from a baked distance field instead of by sampling the alpha on a ring — smooth at any zoom, one texture fetch at any width. Rim Samples is gone; Rim Softness and Rim Inset take its place. Double-sided rendering for every style and pass on cutouts.
  • Five new styles: Lava, Smoke, Crystal, Water and Fire. Fifteen in total, and a profile ships for each. Fire and Smoke gained a second direction angle for meshes.
  • Blend modes per pass, and Single Layer to paint each pixel once where a hull covers it twice.
  • Optional Soft Edge pass for a soft rim on meshes, opt-in and removable in one click. Edge softness on sprites needs no pass.
  • Uniform scale: outline and style keep their proportions on a non-uniformly scaled object.
  • Draw Config exposes queue, ZTest, ZWrite, Cull, depth bias and stencil state instead of keeping them as constants.
  • Rewritten inspector: only the fields the chosen style reads are shown, with width in the unit the mode uses.
  • KeylineOccludedXRay is now KeylineXRayWhenHidden; the old name still compiles as a deprecated subclass, so nothing has to change on update.
v1.0.02026-08-02
  • Initial release.
  • Per-object outlines, highlights and X-Ray for URP and HDRP in a single package.
  • Four passes per object, ten styles, hard-mesh handling, cutout from material alpha, merge groups, skinned mesh support.
  • Thirteen drop-in components and a ten-chapter demo scene.

FAQ

Do I have to change my materials or shaders?
No. The outline is a separate hull with its own material. Your renderer keeps the shader it already has — Lit, Shader Graph, a third-party toon shader, anything. Remove the component and the object is byte-for-byte what it was.
Does it work on sprites and pixel art?
Yes, since 1.2.0. Keyline Outline 2D goes on a SpriteRenderer and takes the same profiles and styles as the mesh component. The rim is measured from a distance field baked out of the artwork, so it follows what is drawn, holes included. For pixel art the field is baked on the texel grid: square corners, an edge on texel boundaries, and a width counted in whole texels at any zoom.
Does it work on flat meshes, foliage cards and thin geometry?
That is the case it was built for. A naive normal-based hull turns flat leaves and single-sided cards into blades. Mixed mode decides per face whether to follow the normal or stay in plane, and Sheet Solidify gives a flat island enough thickness to hold a rim. One model can mix solid volumes and flat sheets — you do not split it into parts.
Can I control what the X-Ray shows through?
Yes, per object. Each component names the Unity layers its X-Ray may show through — glass only, walls only, both — and two objects behind the same wall can give different answers. Transparent surfaces such as glass or water can be declared occluders in Project Settings ▸ Keyline. Nothing is tested and nothing is allocated until a mask is actually narrowed.
Does it support skinned and animated characters?
Yes, with all passes. The hull follows the animation and is not re-baked per frame.
How expensive is it?
Measured in the demo's own Performance chapter: 400 outlined objects in URP draw in 7 SRP batches, the two largest holding 166 and 167 draw calls each. The outline runtime allocates nothing per frame. A Light shader profile is included alongside the Full one; both run on Android, and Light is faster the more outlined objects you have. The Soft Edge pass costs extra only while it is actually drawing a soft rim.
URP and HDRP — is that two packages?
One. The shader carries a SubShader per pipeline and Unity selects by the RenderPipeline tag. Nothing to configure, no renderer feature to add for a hard edge. The Built-in Render Pipeline is not supported.
Can I try it before buying?
Yes — the live WebGL demo is the full 1.2.0 package running in your browser: ten chapters, every style, every recipe, meshes, sprites and pixel art. The manual and quick start are readable online too.
Can I outline a group of objects as one shape?
Yes. Merge groups draw several objects as a single silhouette with no internal edges, either by adding a Merge Group component or automatically by proximity. X-Ray unions across the group the same way, so members never show through each other.
What is the licence on the demo art?
The example models, character, sprites, pattern and splat textures are by Kenney (kenney.nl) under CC0 1.0 Universal — public domain. Keep them, change them or delete them, with no obligation to anyone. The full text ships as Third-Party Notices.txt.
Support

Question about "Keyline"?

I'll help with setup and integration. Updates are free for buyers.

Contact support