Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Applying vignette effect over mutliple (two) cameras.

Discussion in '2D' started by dasgandlaf, Nov 11, 2021.

  1. dasgandlaf

    dasgandlaf

    Joined:
    Aug 13, 2020
    Posts:
    23
    Hi.

    In my game, I am currently facing a little problem, that I have not found a solution for on the internet.
    Basically, I am currently using the vignette effect from URP (Universal Render Pipeline). It applies a vignette effect for every camera, but I do not want that. I want, that this vignette effect stretches out over mutliple cameras, over the whole screen.

    Let's say I have this:
    upload_2021-11-11_11-5-36.png

    This vignette effect I want to apply, I want it to expand across the whole screen, no matter how many cameras are shown. How would I go about this? Also, this needs to happen dynamically. In my game, 99% of the time, the whole game is rendered with one camera, that is stretched to the full screen. Only when an effect comes, which is fairly rare, then the second camera gets activated. The problem here is, that they now have 2 vignettes, which is pretty bad in my situation.

    I appreciate your help :)
     
    Last edited: Nov 11, 2021
  2. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    832
    use two render textures, apply them in a canvas at 50% of the screen each on a raw image.
     
  3. dasgandlaf

    dasgandlaf

    Joined:
    Aug 13, 2020
    Posts:
    23
    Hey, that's a good idea, but wouldn't this need 3 cameras?

    Although I don't think this would work in this situation, because this splitting needs to happen dynamically. Most of the gameplay is only on one camera and this camera is stretched to the full screen, the second camera only gets enabled when there is an effect gets played, which happens fairly rarely. I totally forgot to mention this when making the question, I'll edit it, once sec.