How to create Semantic Segmentation in realtime and copy output to a rendertexture aditionally to the real screen images?

In Unity it is done with a custom pass, it is possible do render different color with an unlit shader based on Gameobject-Tags or layers with a material property block.
What would be the equivalent solution in Unreal? Is there an working example which makes it possible to render real pictiure and semantic segmentation render texure at the same time?

Thanks in Advance