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

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


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.
    8391426--1107336--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

  • Install latest Unity 2022.1
  • Start a new project with the 2D URP Template in Unity Hub.
  • 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.

5 Likes

Hi, glad to see some update on it! Actually I has a question about 2D DOF effect, want some help if you guys have time:smile:. here is the link 2D renderer Depth of Field effect. .

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

1 Like

@Lars-Steenhoff Check out starting at 4:35

1 Like

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: Is it really impossible to achieve the depth-of-field (blurring background) effect in 2D with URP? ). Am I correct that it is not possible and is there any plan to support it? Thank you.

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;

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.

1 Like

Is there a way to make a shader for characters to show a silhouette when the character is behind an object?

1 Like

Will this be for the 2d renderer only?