đŸ”ŗ CosterGraphics Outline System Quick Start Guide

🔧 Quick Start Guide

Follow the steps below to add the Outline System to your Unity URP project.


1ī¸âƒŖ Add the Renderer Feature to Your URP Renderer

  1. Locate your URP Renderer Data asset file (Project → Settings → Graphics → URP Renderer Data)
    Usually named something like Universal Render Pipeline Asset.asset.

  2. Scroll down to Renderer Features.

  3. Click Add Renderer Feature → select Outline3DRendererFeature.

  4. After adding it, assign:

    • Mask Materials
    • Composite Material

    The feature automatically adds default Mask and Composite materials which can be swapped for custom ones.

    The default Composite material is in fact not really an outline but a simple color overlay which is the cheapest of all the Composite shaders since it doesn't require any edge detection. The simples and cheapest actual outline Composite shader is the Outline3D-Composite-Silhouette-Additive Shader Graph shader.

    All of the Outlines use the default Mask materials since they're only needed to generate the Texture Masks with that the Composite shaders use to draw different types of outlines to the screen, so for different types of outlines only the Composite shader has to be swapped!

📝 Without assigning both the mask and composite materials, the effect will not run.


2ī¸âƒŖ Create and Assign the Outline Materials

You need two materials:

Mask Material

Used in the mask pass.

Recommendations:

  • ShaderGraph with a simple Unlit Color output
  • Always outputs pure white
  • Depth writes disabled
  • Lighting disabled

Composite Material

Used in the full-screen outline pass.

Assign both of these materials to the renderer feature.


3ī¸âƒŖ Add the Outline3D Component to GameObjects

Any GameObject with an Outline3D component becomes outline-eligible.

Steps:

  1. Select a GameObject
  2. Add Component → Outline3D
  3. Add the (Mesh) Renderer and/or child Renderers to the Outline3D Renderers list.
  4. Configure per-object values (if supported):
    • Color override
    • Thickness override
    • Rendering priority

â„šī¸ Outline3D itself does not perform rendering it only registers the Renderers with the Renderer Feature.


4ī¸âƒŖ Test the Outline in Play Mode

You should now see:

  • All objects with Outline3D rendered into the mask
  • The composite pass applying an outline around them

If the outline does not appear:

  • Ensure materials are assigned
  • Check if the mask texture is created
  • Ensure the Outline3DRendererFeature executes before post-processing
  • Validate filtering and layers
  • Confirm your object is visible to the camera


âš ī¸ About Outlines in the Scene View

If Outlines aren't visible in the Scene view

If you only see the outlines in the Game View but not in the Scene View then make sure that your Universal Render Pipeline Asset's default Renderer is set to the one with the Outline Renderer Feature. Unity let's us override the default Renderer on a per-camera basis so you can have different Renderers for different scenes but the Scene View camera defaults to the Renderer that is set as default!

-Image of the Universal Render Pipeline Asset and its Renderers list- -Image of the selected Renderer of the Main Camera component-

If Outlines are much thicker in the Scene View than in the Game View

Because the outlines are a full-screen effect, depending on the type they may be influenced by the camera near and far plane distances. If the Scene View camera uses a different near and far plane distance as the Game View it will cause a mismatch between outline thickness. By default Unity uses dynamic clip distances by default for the Scene View camera but it can be turned off in the tool bar:

Image of Dynamic clipping settings

To get the same thickness of outlines shown in the Scene View as the Game view simply set the Scene View camera's near and far plane distances to the same values as the Game View camera, for instance to 0.3 - 1000:

Image of camera near-far clip planes compared to scene view.