📏 Edge Detection Outlines

Outlines are a great way to add polish and style to a variety of games! In this tutorial, I show how to implement edge detection outlines in Unity Universal Render Pipeline using a combination of a shader graph and a renderer feature. Edge detection outlines can affect the entire screen or individual objects, do not change based on perspective, and can accentuate creases and changes in color!

This series contains four videos:

  1. This video introduces edge detection outlines, creates the base shader graph, implements the sobel algorithm, and draws outlines based on color and depth across the entire screen.
  2. This video adds normal edge detection to the outlines from video 1. It writes a depth-normals pass using a renderer feature. It also makes a variety of tweaks to the shader graph, making outlines more stable no matter where your camera views an object.
  3. This video makes the outlines from video 2 apply to individual objects, supporting different outline colors for each. It removes the post-processing pass, but loses access to color data.
  4. This video attempts to optimize the outlines from video 3 while keeping quality as high as possible.

Depth and color: YouTube Patreon


Depth normals: YouTube Patreon


Individual objects: YouTube Patreon


Optimization: YouTube Patreon