What is UE4's equivalent of multi-pass shaders?

The UE4 material editor is cool. We all know that, right? Still, there are times I can’t really get the effect I want with it. Two examples would be:

  1. Object outlines: to the best of my knowledge, to draw objects with outlines, you need to do one pass in which the front faces are culled and the vertices are moved along their normals, and draw with a constant color which will be the color of the outline. Then, in a second pass, You’d render the object as usual, so only a little outline of the constant color from the last pass is left.
  2. “Ghosts”: semi-transparent materials just don’t work with concave objects. The UDK did an outstanding job of rendering transparency (though it wasn’t always perfect), and I’m sure UE4 does as well, but there is another way to do a ghost or a fading character. You can draw every polygon once, with all the z-buffer settings of normal rendering in place, to catch the “surface” of the object, but without actually drawing anything, and then do another pass, this time setting the z-test criteria to “equals”, and only draw the parts of the mesh that are actually on the surface. Doing this will make sure that whatever transparency the object has, it will still be rendered reasonably correctly, and look a lot better to the normal person’s eye than when it has parts drawing on top of one-another.

These, and many more such cases, boil down to one thing: multi-pass shaders. Does UE4 have multi-pass shaders, or something that will create similar effects?

Hello,

We have not heard from you in a while and for tracking purposes we have marked this answer as resolved. If you still have a question relating to this post, or are still experiencing this issue, please create a new post on the AnswerHub and we will be glad to assist you!

Thank you

Well it’s not like I got an answer, so I’ll do that! Thanks for all the effort you guys put into keeping this place tidy!