2D Graphics (URP 11.0) released for Unity 2021.1

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:

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.

Camera sorting layer texture is broken with capturing Normal buffer instead…

I have a weird bug related to Light 2D editor window. My newly created 2d lights are refusing to save changes that I did to Normal Maps quality settings (Disabled, Fast, Accurate). No matter what setting I chose, after reloading scene it defaults to ‘Disabled’ state. The weird thing is that scene reacts to changes and prompts me to save them. Unfortunately, it saves nothing.
But even more weird is that lights created in previous version of URP (which were updated after updating URP) don’t have this problem.
I use Unity 2021.1.9f1 and URP11. Can anyone confirm this bug?
Upd: After switching Inspector to Debug mode I can see that Normal maps quality dropdown won’t set UseNormalMap variable to true. After setting it manually, changes persist after scene is reloaded.
This variable can’t be seen without the Debug mode. Someone removed it from the editor but forgot about it? =)

1 Like

This indeed is a known bug, I have reported it as well. I think it is supposed to be fixed for URP 12 but backporting to URP 11 is unknown.

Thanks. I should have checked the issue tracker first. We are lucky it’s possible to bypass the problem by debugging the editor, but I hope the solution will be backported to urp11.

1 Like

Right now, there are so many core missing features to 2Drenderer, and there are some critical bugs which is preventing it from being used practically at all. Also the apparent few fixes that is supposed to come to URP 12 is … well, who knows when that will land on URP 11.0. We don’t even know when URP 12 is going to be released. I think URP 12 will never be released for 2021.1.x versions. I think they may just be released for 2021.2.x versions of Unity only. Very Very Frustrating.

Yes you are right. There are many core missing features.

Sweet! I was able to look at a heat displacement shader today and this was a great start.

The problem is that I really want to ask for the ability to specify more than one layer where the _CameraSortingLayerTexture can be set. For example, let’s say I have background torches that I want to affect the background with heat ripples, but there are other environments or flames that I also want to affect the characters that appear in the foreground. Right now if I’m understanding the workflow correctly, this texture will only be rendered one time and only with the combined layers of the layer you specify. Is this possible or can this be quickly snuck into URP12?

Hi could you please make better compatibility with visual scripting? I have script which changes inner angle and outer radius of light, but it does nothing (and I looked carefully in unit options in project settings)

  • postprocessing also can’t be changed based on state

Hi 2D folks! :slight_smile: 2D Graphics (URP 12) has been released for Unity 2021.2. I’m unsticking this thread. Please join the discussion here .