I have scene rendered with a single camera using target texture (a). Second camera is used to render UI and using same target texture (a) as the first one. Third camera takes target texture (a), depth texture and apply post proces. Result is rendered to the screen.

How can I apply postprocess only to the output elements that are not UI?

  • 3
    \$\begingroup\$ Change the order in which your cameras render. Instead of Scene -> UI -> Postprocess, make it Scene -> Postprocess -> UI. Then the UI gets added after the postprocess and can't be modified by it. \$\endgroup\$
    – DMGregory
    Dec 7, 2015 at 13:55
  • \$\begingroup\$ @DMGregory that should be an answer, not a comment. Agree on solution. \$\endgroup\$
    – irreal
    Dec 7, 2015 at 14:42
  • \$\begingroup\$ I wanted to test the water first in case there was something in OP's use case that prevented/complicated reordering the rendering like this. (Otherwise I'd expect they'd have already done it) But if that's all they need then I can certainly create an answer. What say you, Martin Perry? \$\endgroup\$
    – DMGregory
    Dec 7, 2015 at 17:31
  • \$\begingroup\$ I alreday tried reordering cameras. It works, but problem is I am doing some post-processing with whole scene (UI + geometry) and I can not change order. Final camera must stay as the last one in the pipeline. \$\endgroup\$ Dec 7, 2015 at 18:28
  • \$\begingroup\$ @DMGregory Put it as answer, I will upvote it. It can be apliable for some futer readers. \$\endgroup\$ Dec 7, 2015 at 18:31

1 Answer 1


Simple, but not very "efficient" solution. First camera will have post-process effect attached. I apply it to the render target texture (a). Now I use the same path as before.

Problem is, that I double some calculations and I process twice many pixels.

  • \$\begingroup\$ If you tell us a bit more about what post-process effects you're applying in what order (pictures always help) then we might be able to help you find more efficient options. \$\endgroup\$
    – DMGregory
    Dec 7, 2015 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .