Author Topic: Multiple cameras and image effects  (Read 7083 times)

Holy Manfred

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 8
  • Posts: 71
    • View Profile
Multiple cameras and image effects
« on: October 31, 2016, 11:52:31 AM »
I am trying to achieve an effect where the background UI gets blurred when a window is opened up.

I have two 2D UI cameras and I am adding a new UI element to the camera in front while at the same time activating a blur image effect on the camera which is behind. However the blur effect always blurs the whole screen instead only the content from the camera which it is on.
Is this an approach that is supported by NGUI or should I find a different way of blurring parts of my UI? Any other hints how to achieve a nicely blurred background effect would be appreciated.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multiple cameras and image effects
« Reply #1 on: November 03, 2016, 08:07:01 AM »
You need to make sure that your two UIs are on different layers. One camera draws one layer, another camera draws the other.

Holy Manfred

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 8
  • Posts: 71
    • View Profile
Re: Multiple cameras and image effects
« Reply #2 on: November 03, 2016, 09:44:46 AM »
I split it up into two different UIRoots and separate layers and it works fine now. Thanks!