Table of Contents

🔳 CosterGraphics.Systems.OutlineSystem - TroubleShooting & Frequently Asked Questions


❔ Frequently Asked Questions

❔ Why Does Using Multiple Outline Render Features Sometimes Causes Weird Artifacts?

The OutlineSystem is designed with the feature of being able to stack multiple OutlineRenderFeatures in mind, but there are a few things to consider when trying to layer multiple OutlineRenderFeatures on top of each other.

  1. When using multiple OutlineRenderFeatures that use the same Composite outline material at runtime the OutlineRenderFeatures might try to apply masks to the same material during the same frame and things might break. When using multiple OutlineRenderFeatures that use the same type of outline shader then it is best to create multiple materials for each feature so that materials don't get mixed up. Currently this is a limitation of the system that may be adressed later by giving the option to instance the materials but at the moment this feature isn't implemented yet.

  2. The order of the OutlineRenderFeatures in the Renderer Features list of the URP Renderer asset matters. The RenderFeatures at the bottom of the list get executed last so if you want say a thick white silhouette outline with a thin black contour line on top then the thin black outline should go below the thick white outline in the list otherwise the thick outline gets rendered on top of the thin outline.

  3. The order of the Render Pass Events of the Scriptable Renderer Feature's Render Passes also matters and for each Render Pass the order can be set in the Inspector but it is not recommended to do so since the default setting of 'Before Rendering Post Processing' usually works best for all of the Render Passes.

    If for some reason the Outline Render Passes injection point has to be changed then keep in mind that mask passes should always be injected before the final composite pass and that some of the masking passes rely on other masking passes to have been executed before it. The OutlineSystem is designed to keep each OutlineRenderFeature's render passes seperate from each other and from Unity's built-in render passes (each Outline3DRenderFeature is basically a small mini render pipeline injected between Unity's render passes in the Render Graph) but with many stacked Outline3DRender features mixed with maybe other types of Renderer Features (Decal, SSAO, DoF etcetera.) things can become unpredictable, so keep that in mind when mixing different outlines. Generally speaking it is more efficient to say combine a silhouette outline with a contour outline all in the final composite shader (for instance with a Hybrid Silhouette&Contour outline shader) instead of running two seperate OutlineRenderFeature's since when combining them in the composite shader only one feature has to run the mask Render Passes.

❔ Whats With All The Emojis??..🫠

Emojis or colored symbols can really help with quickly navigating trough code in scripts and quickly find stuff. Humans in general can recognize things very fast by color and by shape. (Often the first thing we 'read' with our eyes when observing objects like cars and people in the distance outside is the objects color and rough silhouette shape, then when we go for the 'second read'/look for the second time, we mentally fill in the general color and shape with the other finer details that we notice!) Having a custom symbols font would be even better but at this time Emojis are about the only colored set of generic symbols that just work basically everywhere and on every computer. They work in script comments, Shader Graphs and on website documentation pages so at the moment it is the best option we've got!

See the OutlineSystem Glossary for an overview of what the Emojis mean in this context:

  • 📙 Glossary - Glossary of Terms like "ULP," "Render Graph"


🔫 TroubleShooting