Post Processing To Control Transparent Objects


I have tried to search for an answer and tried playing around with Before/After tonemapping/Before Translucency but struggled to find a solution. (I would like to say I an new to creating post processing materials so I don’t know its limitations, so I am sorry if this is a silly question.)

Basically I am hoping to find a way to do post processing only on transparent objects, so for example make them more transparent or distort them but not the opaque objects behind them, etc.

Any advice or help would be greatly appreciated.

Thanks in advance.

That’s not possible. A post process is a shader that takes one or more images, processes each pixel and writes the result into another one. What you want to do is more feasible directly in your transparent materials by coding the effect there and read parameters from a global material parameter collection.

Hi, Thank you very much for taking the time to reply, Thats a shame I was hoping that since I could get the transparency RGB and alpha from a scene texture, I might be able to get the scene without the transparency added so that I could do a bunch of stuff to the transparency and then add it back on top of the scene to create the final image.

I have done a lot of stuff in the material its self (as you suggested) but was hoping to distort the transparency “pass” in a pixel blocky fashion outside the bounds of the object without distorting the objects behind it. (hope that makes sense)

Not sure if I get it, but if you want to manipulate the opaque pixels behind the transparent object, transparent materials can read the scene color containing from the opaque pass by using the SceneColor material node.

If you want to affect every pixel except the ones covered by your transparent objects, then you should look into using custom stencil masks. Transparent objects cannot write to the custom stencil, but you have have an invisible duplicate of your transparent object that only renders to the stencil mask buffer. You can then read the stencil value in the post process to decide what to do.

Hi Manoel,

Thanks again for the reply and suggestions. I have played around with Custom Depth/Stencils and managed to get some things working to a degree but was thinking that if the transparent objects and background had separate scene textures it might give even more options and possibly make things a bit easier to work with since I am a noobie at all this.

I realise that is difficult to understand what I am talking about without a picture so here is a very quick image, I have used a solid cube for the image to make it easier to see the effect I was trying to create…


Thanks again

Hi not sure if this is a silly question as I really have little/no HLSL shader writing experience but Is there a way to have a float array in unreals custom node, in the material editor?

Seen similar things in GLSL but did not know if there was a HLSL equivalent. Any help would be greatly appreciated thank you.