Search Unity

Official 2D Graphics (URP 13) now available with Unity 2022.1

Discussion in '2D' started by rustum, Aug 26, 2022.

Thread Status:
Not open for further replies.
  1. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    2D Graphics (URP 13) now available with Unity 2022.1
    2D Graphics 13.png
    We’re happy to share that new 2D Graphics features in Universal Render Pipeline (URP) 13 are now available with Unity 2022.1.

    What’s new?
    • Blending modes have been added to the Sprite Lit, Sprite Unlit, and Sprite Custom Lit master stacks in Shader Graph. This enables you to create shaders that can blend using alpha, premultiply, additive and multiply blending modes.
      Blending Modes.png
    • The 2D Pixel Perfect Camera has been enhanced with the addition of a new upscale filter to reduce blurriness.
    See the full URP 13 changelog here.

    About 2D Graphics in URP
    2D features in URP include 2D Renderer, 2D Lights and Shadows; and the 2D Pixel Perfect Camera to support projects with a pixel art style.

    Read more about 2D Graphics features in URP here.

    Getting Started
    1. Install latest Unity 2022.1
    2. Start a new project with the 2D URP Template in Unity Hub.
    3. This will ensure that you have installed all the latest major versions for 2D and URP packages in 2022.1.

    If you want to add the package manually from Package Manager follow the steps in the setup guide in the manual.

    What can you do?
    Try it out and let us know what you think of the additions and improvements. We want to know what works as expected, what doesn’t and what is missing.
     
    msfredb7, eterlan, RemDust and 2 others like this.
  2. eterlan

    eterlan

    Joined:
    Sep 29, 2018
    Posts:
    177
  3. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    Is is possible to have 3d background and a 2d foreground?
    In order to make a game like this? in this game the water for example looks 3d
     
    EvOne likes this.
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,511
    EvOne likes this.
  5. znagler

    znagler

    Joined:
    Sep 25, 2022
    Posts:
    9
    Hi, it seems several people are asking about 2D depth of field in URP and it is still not clear to me what is supported. The outcome I want seems simple relative to other things URP can do, so it’s so surprising that it might not be possible– I just want a perspective-camera 2D scene where the background layers get blurred (ie. using z-values, and larger z means more blur). For my use case, I would even be OK with a single blurred z-threshold (making everything behind a certain Z blurred to the same degree) and I am willing to use multiple cameras or anything to achieve this. But it does not seem possible (I also asked in more detail here: https://forum.unity.com/threads/is-...ing-background-effect-in-2d-with-urp.1346948/). Am I correct that it is not possible and is there any plan to support it? Thank you.
     
  6. eterlan

    eterlan

    Joined:
    Sep 29, 2018
    Posts:
    177
    After a lot of research, I found there are multiple ways to do it. In your case, bake all the background image in the photoshop might be a simple way to achieve DOF;
     
  7. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,511
    I was able to get Depth of Field to work with ZWrite On sprites but only by forking the 2D Renderer which is a gigantic pain.

    If you can settle for a single z-plane then multiple cameras will work. What you want to do is look at the 2D Renderer samples's Kawase Blur demo. https://github.com/Unity-Technologies/2d-renderer-samples/tree/21.1

    You use two cameras, with the blurred one using a separate Renderer2D asset with that blur pass.
     
    RemDust likes this.
  8. juicedup

    juicedup

    Joined:
    Aug 18, 2019
    Posts:
    47
    Is there a way to make a shader for characters to show a silhouette when the character is behind an object?
     
    Viole likes this.
  9. PBKitty

    PBKitty

    Joined:
    Dec 23, 2021
    Posts:
    45
    Will this be for the 2d renderer only?
     
Thread Status:
Not open for further replies.