Any way to do multiple, DIFFERENT outlines / blendables simultaneously?

Right now, you can select an object in our game, and it gets a nice green outline. And that’s great.

We do that by having the green emissive material in the PostProcessVolume, as item index 0 in our Blendables list, and then we call SetRenderCustomDepth(true) for anything we want to outline.

The problem is, while also outlining some things in green, we also sometimes want to outline other things in blue.

How can we do this? SetCustomRenderDepth() only takes a boolean, not an index into the Blendables list.

And if we add another element to the Blendables list, how will we tell the game which one to use?

Obviously we can’t modify the one material in the Blendables list, since we need one object to have a green highlight and the other to be blue – and the same material can’t do both.

Hey -

By default in the engine you only have the singular Custom Depth pass, but a user on the forums has been working very hard to achieve exactly what you are looking to do, [Odessey] Creating my own G-Buffer in UE4 - C++ - Unreal Engine Forums

Thank You

Eric Ketchum

This may be a silly suggestion, but can’t you do what you’re after within the original material using a paramater to switch it to a fresnel based shader (with glow etc) from another class/BP?