2D Graphics (URP 11.0) released for Unity 2021.1
What’s new?
With the release of Unity 2021.1, 2D Graphics features in URP 11.0 are now available. This release includes:
-
Camera Sorting Layer Texture
-
The Camera Sorting Layer texture works like a grab pass. It can be accessed in shaders to create overlay effects such as refractive water or heat haze.
-
Improved Performance
-
Optimized 2D Renderer performance on mobile GPUs by reducing the number of render target switches.
-
Optimized 2D Renderer performance by rendering the normal buffer at the same lower resolution as the light buffers.
-
Optimized 2D Renderer performance by using a tiny light texture for layer/blend style pairs for which no light is rendered.
-
Improved Workflows
-
Added 2D Renderer Asset Preset for creating a Universal Renderer Asset
-
Improved Light2D UI/UX
-
The Blend Style render texture scale in the 2D Renderer is now a global scale setting for all Blend Styles.
-
Shadow Caster 2D will try to use sprite and physics bounds as the default shape when created.
-
Improved Geometry for Smooth Falloff of 2D Shape Lights.
-
Added new default Blend Styles when a new 2D Renderer Data asset is created.
See the full URP 11.0 changelog here.
About 2D Graphics in URP
2D graphics features in URP include 2D Lights, 2D Shadows and the 2D Pixel Perfect for implementing a pixel art aesthetic in your projects.
It also adds support for creating Lit and Unlit Sprite shaders in Shader Graph and is compatible with Post Processing.
Important Note:
As a reminder: This will be the new home for Pixel Perfect Camera. The standalone package will still receive bug fixes, but new features will only be added here.
Read more about 2D Graphics features in this section of the Universal RP documentation.
Getting Started
In an existing project in Unity 2021.1:
- Open Package Manager by going to Window > Package Manager
- Select Unity Registry in the Packages drop-down menu.
- Choose Universal RP from the list and click on Install at the bottom right of the Package Manager window.
Setting up the 2D Renderer
To use the 2D Renderer some configuration is required.
Read this section in the documentation for detailed instructions on setting up the 2D Renderer.
Upgrading Projects and Scenes
If you are installing the package into a Project with pre-existing Prefabs, materials or Scenes, you will need to upgrade any materials used to a lighting compatible Shader.
This section in the documentation is all about upgrading.
Samples
If you’d like to see examples of 2D Lights, 2D Shadows, Pixel Perfect Camera, Post-Processing, Shader Graph and the Camera Sorting Layer Texture, get the 2D Renderer Samples for Unity 2021.1 here.
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.