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

Combine 2d renderer, 3D perpective camera and depht of field

Discussion in 'Universal Render Pipeline' started by harusame-, Jan 24, 2021.

  1. harusame-

    harusame-

    Joined:
    Nov 18, 2013
    Posts:
    11
    Hi all !

    We create a 2d sidescroller with several effects and we exploit depth on the foreground and background a lot. For this we use a technique described in an article by gamasutra: https://www.gamasutra.com/blogs/Mic...hic_Camera_for_Parallax_Effect_in_2D_Game.php

    We use sprite-shape, 2d light and shader graphs on the URP renderer.

    Our cameras :
    3d camera - perspective (background and depth effects) with some big sprites.
    2d camera ortographic - game plan, with colliders, sprite-shapes, 2d lights and various effects with lot of sprites.
    3d camera - foreground with some sprites and vfx.

    On this stack, we add some various post-process effects.

    We would love to add depth of field on this to blur the foreground/background depending on the distance and add awesome depht effect it's not working with sprite-renderer and camera stacking.

    Do you have an idea for doing this?