# Post Processing Texture won't blend with edge detection shader

**URL:** <https://forums.unrealengine.com/t/post-processing-texture-wont-blend-with-edge-detection-shader/632774>\
**Category:** Rendering\
**Tags:** Post-Processing, unreal-engine, UE5-0, Shaders, question\
**Created:** [August 23, 2022, 4:47pm UTC](https://forums.unrealengine.com/t/post-processing-texture-wont-blend-with-edge-detection-shader/632774 "2022-08-23T16:47:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_c100f9301](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c100f9301](https://forums.unrealengine.com/u/anonymous_user_c100f9301)\
**Post date:** [August 23, 2022, 4:47pm UTC](https://forums.unrealengine.com/t/post-processing-texture-wont-blend-with-edge-detection-shader/632774/1 "2022-08-23T16:47:34Z")

</div>

Hi all, I’ve been beating my head against the wall with this bug for a couple days now and I’m at my wits’ end.

I’ve been following along with [this tutorial on edge detection](https://forums.unrealengine.com/t/edge-detection-postprocess-feedbacks/95186) to try and create a post-process material for highlighting selected objects. In theory, it should be as simple as adding the black-and-white edge detection data to the scene texture, but for some reason 1 = 0 anytime that I connect any node that could blend these two textures. (This includes the Lerp from the tutorial, add, multiply, blend, and anything else I throw at it)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/7/287b0a15d28c818cdf269e43eba5256839f6a664.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/3/c/23c86a62fd5f251ba5522eae61705f2ca03c9ab8.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/d/87dbbb075266c1e555584f0cdf3f56c9f5893e6e.jpeg)

As soon as I hook up the color from the SceneTexture node, it ignores the sobel data entirely and shows the unmodified color. There is no indication of error, and all debugging I’ve done indicates that my sobel data ranges from 0-1 so it should be visibly affecting the render. Is this just a bug in the engine or is there some secret rule I’m breaking somewhere along the way that didn’t break rules in UE4?

(The code inside my MF\_Sobel node is just like the PP\_EdgeDetect from the tutorial with the inputs dragged out, for the record)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c100f9301](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c100f9301](https://forums.unrealengine.com/u/anonymous_user_c100f9301)\
**Post date:** [August 23, 2022, 8:55pm UTC](https://forums.unrealengine.com/t/post-processing-texture-wont-blend-with-edge-detection-shader/632774/2 "2022-08-23T20:55:19Z")

</div>

Update: By disconnecting the InvSize from the PostProcess0 texture and replacing it with a Float2 (1,1), the whole shader is suddenly working as expected.

In the interest of learning, does anyone have any idea why that would prevent that side of the shader working?
