# How to avoid outline shader not override other stencil outline color?

**URL:** <https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754>\
**Category:** Rendering\
**Tags:** unreal-engine, shader\
**Created:** [October 22, 2025, 9:56pm UTC](https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754 "2025-10-22T21:56:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![UTiMATE\_KIRBY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UTiMATE\_KIRBY](https://forums.unrealengine.com/u/UTiMATE_KIRBY)\
**Post date:** [October 22, 2025, 9:56pm UTC](https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754/1 "2025-10-22T21:56:53Z")

</div>

Hi, folks ! I am facing a problem with my outline shader.The shader support multiple color at once like in the image bellow.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/3/0b3515b8aa7f88bdd122ce644e2a511c2f1b6909.jpeg)

You can see that the two color are completely rendered fine. But the problem start to appear when you take camera angle when two object with outline merge together. The object rendered behind of the front one start to cover the front one with it’s own outline color.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/0/c402d6b031a03c045a167ca9a15dab78085c54b6.png)

I can’t figure out the problem and I have no clue what to do to avoid this problem I had uploaded my blueprint here.Can this be solved?

And extra problem here is that sometime when the camera get closer to the front object the outline of the object behind start to change.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/4/5443c7b75ae30bfbb0b75ec5c358a10864cd9c63.jpeg)

> **[Outline Shader posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/bqx-92h4/)**
>
> No description provided

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/7/ea7121bf8cc6002f24904f6891edc016b1c13200.png)

Here is my material Instance settings.

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [October 23, 2025, 3:16am UTC](https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754/2 "2025-10-23T03:16:26Z")

</div>

i usually love blueprintue but there are nodes that have no name and it’s a bit more complex than the time i can put. so i haven’t checked it.

my assumption is that the issue is with the part that selects which color to use. somehow it’s not exclusive. since you’re working with numbers it’s quite possible.

in case it helps you here are some materials i’ve made for making outlines, it’s not perfect but maybe it helps you. it’s foss.

> **[JUtils](https://codeberg.org/jerobarraco/JUtils/src/branch/master/Content/Mats/Outline)**
>
> Plugin for Unreal Engine 5 that has lots of utilities

---

<div class="post-metadata">

**Author:** ![UTiMATE\_KIRBY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UTiMATE\_KIRBY](https://forums.unrealengine.com/u/UTiMATE_KIRBY)\
**Post date:** [October 23, 2025, 11:48am UTC](https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754/3 "2025-10-23T11:48:27Z")

</div>

Thank you very, but when I copied your uasset directly to my explorer it didn’t show up in content browser.

---

<div class="post-metadata">

**Author:** ![UTiMATE\_KIRBY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UTiMATE\_KIRBY](https://forums.unrealengine.com/u/UTiMATE_KIRBY)\
**Post date:** [October 23, 2025, 8:36pm UTC](https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754/4 "2025-10-23T20:36:56Z")

</div>

> **[M\_OutLine posted by missrizahawkeye | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/vdw8omq2/)**
>
> No description provided

This shader here helped me to solve the issue.I guess the problem were in calculation used in alpha.

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [October 23, 2025, 9:09pm UTC](https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754/5 "2025-10-23T21:09:40Z")

</div>

It’s a 5.6 asset. Not sure which version you use.

Afaik you cant just drop the asset in a folder, youll have to put the plugin where it should. Maybe on a blank project if you want to experiment.

Im glad youve solved this.

---

<div class="post-metadata">

**Author:** ![UTiMATE\_KIRBY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UTiMATE\_KIRBY](https://forums.unrealengine.com/u/UTiMATE_KIRBY)\
**Post date:** [October 23, 2025, 9:13pm UTC](https://forums.unrealengine.com/t/how-to-avoid-outline-shader-not-override-other-stencil-outline-color/2667754/6 "2025-10-23T21:13:23Z")

</div>

Same 5.6.1 here.
