Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Post processing impact and usage

Discussion in 'General Graphics' started by pfernan, Jan 13, 2015.

  1. pfernan

    pfernan

    Joined:
    Jan 13, 2015
    Posts:
    10
    Hello,

    I have been looking around about how to implement some effects on Unity.
    The game is a top-down 2D game, and I wanted to create water reflections.
    I created a second camera view that used a negative scale for the Y axis, which does the following:

    -Only renders vertical elements (like trees or rocks, no ground or floor decoration)
    -On the precull function I multiply these gameObjects' Y-scale by -1, turning them upside down (this looks consistent because I set the origin of my sprites at the base)
    -Once its done, I give the gameObjects their original Y-scale value

    I render this camera first, and then my standard camera, which result in vertical object having a reflection on their feet, which is exactly what I was looking for.

    So here are my questions:

    -Is it possible to add a Post Process effect only to the first camera, so all the reflected scenery by the first camera looks wavy?

    -If this is the case, could it be possible to use several post processing effects, applying one for the first camera, and another one to the whole rendered scene, including all cameras, except the GUI? Would this have a big overhead?


    Thanks,
     
  2. pfernan

    pfernan

    Joined:
    Jan 13, 2015
    Posts:
    10
  3. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Each individual camera can render to a rendertexture if you have pro, or have camera effects applied to it, I think. Generally a camera effect requires rendering to a rendertexture and then passing that through a shader that renders full-screen again. So it's basically adding another pass.