Atan Outline URP


URP screen-space outline effect with RenderGraph, VR/WebGL2 compatibility, different filters and layer filtering


by Atan


Price History +

You can try this package here: https://atan-games.itch.io/atan-outline

A game I developed that uses this outline: https://atan-games.itch.io/polaris-inc


I was unable to find a working implementation of a screen-space outline in Unity URP RenderGraph that allowed me to exclude certain layers from the outline. So, I ended up building it myself.


Compatibility


This package only works with the Universal Render Pipeline (URP) version 15 or higher. It is designed for 3D projects.


I’ve tried to make it as compatible as possible. Both mobile and desktop platforms should work fine. This asset supports WebGL2, WebGPU, and VR. It should work with both single-view and multi-view VR rendering.

Note: I have only tested it on an Oculus Quest 3 using OpenXR, so I cannot guarantee full compatibility with all headsets.


If you run into any issues, feel free to contact me via email.


Features

  • Essential Outline Settings: Adjust settings like Outline Size, depth and normal thresholds, filters, output mode, distance-based fading, outline color, and more.
  • Screen-Space Outline: This package uses a URP RenderGraph that can be added as a render feature to apply outlines to the entire scene. Note: This is not a per-object outline.
  • Selective Layering: You can exclude specific layers from receiving outlines, useful for excluding complex geometries that don’t look good with outlines.
  • URP RenderGraph Integration: I’ve commented most of the code to help you understand how it works, making it a learning resource for RenderGraph. The outline effect is built using the new URP RenderGraph system, which replaces older render features.
  • High Performance: The effect is optimized into a single fullscreen blit, avoiding intermediate textures. However, keep in mind that screen-space outlines are inherently a relatively expensive effect.
  • Multiple Filters Included: Choose from Roberts Cross, Sobel, Scharr, Simple Gradient, and Kirsch filters.

For higher performance, a minimal version is also included, which generates outlines based only on normals and skips more expensive calculations.