Are multi-pass shaders on single objects currently possible via the Material Editor?

Is there any way at all to implement a shader which pre-processes a surface, then references that data in a second pass? Doing this in post or via scenecapture2d is too restrictive/slow for my intended use. It seems like it should be really simple but I can’t find any way to accomplish this.

Hi SF -

Can you be more specific as to your end goal? You can use the Layered Materials setup mentioned in our documentation to process different elements and combine them in the single material. You might also depending again on your end goal, be able to use some custom HLSL to achieve a similar effect as well.

Let me know and I will see if I can help you -

Eric Ketchum

Hi Eric,

I think maybe you haven’t noticed that the question is about 10 months old. I just voted for it because I have a similar problem. Maybe you could help me?

Greetings,
Jens

Hi jensH -

This question came up as one of our most viewed questions and I wanted to see if we could address it. If you have a similar issue feel free to post the specifics here and I can try to answer both.

Thank You

Eric Ketchum

Hi Eric,

I have a posted about it on the unreal forums here, maybe look at that? The general thing I’m trying to do is port the SMAA t2x to the unreal engine, because the TAA isn’t working out for our game. The post processing effect needs multiple passes that I can pass on to each other. I already have the edge detection working and I stumbled upon the problem that I can’t seem to figure out how to do multiple passes in the unreal material editor.

Thanks,
Jens

Hi Eric,

I haven’t heard from you in a while. I thought I would give some more info. I need to store a render target some way or another to use in multiple algoritms and then blend them all together. I the picture you have a diagram of how my render pipeline should look.

Thanks

Hi jenH -

I am assuming that in this question you are needing to adjust post process settings in addition to material settings.

If you can give me a very specific case I might be able to help find away around the issue, but if you are using a Capture 2D actor you can have that actor apply a unique set of Post Process effects, such as Edge Detection. In a Material you can take the Capture 2D actor and apply many different changes to the images and use the Material Layer Blend options to place those materials back together and render them out in the world. If you want to exclude the rendered object from the world post process pass, you can setup a custom depth or custom stencil pass to keep it from getting the world post process effects.

Again this is in brief, but if you get me a specific case example I am happy to work something up for you.

Thank You

Eric Ketchum

For anyone looking at this old question: 4.13 has added a render to texture workflow using Blueprints.