Hey, just wondering if the experimental 2D pipeline will ever support renderer features?
I’m switching my 3d project over to the 2d renderer and noticed I can no longer add features to the renderer
Eventually yes. But that’s not our current focus.
+1 for adding support and getting the forward and 2d renderer on-par.
Is there any ETA on this? This is stopping my team from using a few asset store purchases among other things. Knowing if it will be released in the next few months would let us make an informed decision on whether to let it go, use a different renderer, etc.
We don’t have a plan to implement Renderer Features for the 2D Renderer in the near future.
Thank you for your reply, If I may ask, is this because there is nobody available to implement it (any rough idea when someone will? 6months, 1 year? 2 years?), or because there is a technical reason why it would be a bad idea?
I suggest using the regular URP pipeline - it’s perfectly fine for 2D still… or elaborating why you’re interested in renderer features for 2D for potential workaround so advice can be given.
The renderer features thing is more valuable for complex shaders. If it’s 2D it will generally mean you can throw some unlit shaders out there and do the same thing.
I wanted to use the 2D Pipeline, because Unity showcased that it’s possible to make a cool 2D project and it has a few nice features, like 2D lights. So I started using it, expecting development on it to continue, but there are multiple threads where the reaction is “not planning to support it anytime soon” which feels weird. Why showcase all this really nice tech aimed specifically at 2D, and then “abandon” (probably a bit unfair comment) it with replies “not planning support for feature x anytime soon” and “URP is fine - use that” ?
Specifically in this case, I have an assetpackage rendering water, which requires renderer features to make it work (specifically a renderer-feature that makes sure the water gets rendered in the correct order and can “clip out” an earlier rendered sprite so the water doesn’t overwrite it).
The situation is simular to Geoffl who wants to purchase assets requiring support for it.
Now my assumption is that the 2D renderer is what Unity intends us to use mid- to long-term for 2D projects. While I understand your advice that there are other options like URP, built-in, or even another engine (Unreal, Godit, …) my question is about the 2D renderer and while I understand it’s experimental (fine) I think it’d be fair to give a rough timeframe where this is going, specifically with official support for missing features like camera stacking and renderer-features.
2D pipeline features would be no slower in URP in my opinion. I think most if not all the features would also work in URP however that’s only my personal opinion. A 2D pipeline is unlikely to ever be that compatible with asset store assets unless the author says it is.
Are you using assets that are designed for 2D pipeline, or could you link the asset you’re trying to get to work?
Anything using surface shaders probably won’t work on SRP at all unless specifically stated on the asset. Anything using vert/frag shaders may work with small modifications.
I’d be fine using 2D lights (+global light) in URP… so when is support for that planned?
I contacted the Author of the specific asset, and he plans to add a fallback for 2D.
So, let’s try and take a small step towards getting these things supported:
camerastacking in the 2D renderer:
\runtime\ScriptableRenderer.cs → public bool cameraStacking { get; set; } = true; // change false to true
renderer-features in the 2D renderer:
\runtime\2D\Renderer2D.cs, function Setup at the end, just before the if-finalblit:
for (int i = 0; i < rendererFeatures.Count; ++i)
{
rendererFeatures*.AddRenderPasses(this, ref renderingData);*
}
\runtime\editor\2d\Renderer2DDataEditor.cs
using UnityEditor.Rendering.Universal; // at the top
internal class Renderer2DDataEditor : ScriptableRendererDataEditor // was: Editor
function OnInspectorGUI add this as the very last thing:
base.OnInspectorGUI(); // Draw the base UI, contains ScriptableRenderFeatures list
So with those changes we can add renderer features to the 2D-pipeline and stack camera’s in the 2d renderer.
Additional feedback:
- The water-package requiring renderer-features now works.
- Camerastacking (to get a nicely blurred bokeh-background using a camerastack) works.
What doesn’t work:
- Enabling HDR and stacked post-processing (personally not using it)
- Sprite masking is broken when using post-processing (artifacts), in both 2D water-packages I tried.
So basically the problem is with external assets from asset store? Did the authors say these were designed for any SRP at all? Find that out first or it won’t work in URP either.
If you want assets from the store to work you could ask the asset authors to update their assets.
… which I did (as you can read in my earlier post). Both of them work fine in URP, and mostly (but not entirely) in the 2D renderer with the above manual changes.
… and in addition I asked the question here when those features are going to be officially supported by Unity (if at all) which would help more people then just me - furthermore making a reasonable effort helping to get support in for these features (see my previous post), also so I can help providing repro-cases for bugs in the future.
This discussion is being sidetracked by pointing to “Use URP instead” and “Talk to the Authors” and “Check compatibility of the assets” and “you should have checked before you purchased” - which are all besides the point. I’m not blaming anyone or anything.
My question is simply how serious Unity takes the 2D renderer, seeing the “not planned soon” comments all over the place, in the context of the seemingly minor effort needed to get it (mostly) working with minimal effort in a very generic way. And thus it circles back to the original question “Is there a reason why technically this is a bad idea” and “if not, when is this in the schedule: 6 months, 1 year, 2 years?”
@rboerdijk I hear your concern loud and clear.
First, to answer your question about how serious Unity is about the 2D Renderer - We have two engineers from the 2D Team working exclusively on the 2D Renderer, supported by other engineering teams from within Unity (e.g. the URP Team and the Mobile Graphics Team). We have also people from Marketing busy making more demos using the 2D Renderer. So, we are seriously serious about the 2D Renderer.
The reason why some of the nice features you mentioned here have taken a back seat at the moment is we need to first get performance right. Right now the 2D lighting system is not as fast as we want it to be, especially on mobile GPUs. So both @Chris_Chu and myself are focusing on improving the efficiency of the 2D Renderer.
That said, we did realize there’re these ‘low-hanging fruits’ eagerly sought after by a lot of you. So last month we took a small break from performance and implemented camera stacking for the 2D Renderer (although not hard, it’s no one-liner either). Expect it to be available in the next versions of URP (7.4 and 8.2). So that’s one item crossed from the low-hanging fruit checklist. Renderer Features is now on top of that list.
Thank you, I really appreciate you taking the time to explain, especially clarifying that the “performance improvements” are specifically aimed at the 2d renderer. It’s understandable that tasks need to be prioritized, but the key for me (and I guess others) is to know it will be addressed, as opposed to it being on the "never going to happen because … " list (possibly for good reasons).
Anyway, there’s more then enough other things for me to focus in the meanwhile, so it’s perfectly fine to “semi-ignore” some the missing features for now. Looking very much forward to official 2d-stacking support. That will already help a lot, also knowing we can soon post decent bugreports for stacking instead of “I modified the official code like x and now run into issue y” kind of reports.
Noticed the 7.4.1 update and applied it. Stacking is there, and it also works correctly with postprocessing - nice!
Thanks Cai and whoever else implemented this!
Let me know if you encounter any issue using it.
Edit: Old post, but I believe the issue with this was that Package Manager now has an advanced section where you have to check a box to “Enable Preview Packages”.
Hey guys, I’m having a bit of confusion with versioning for URP. I’d like to update to 7.4.1 and check out the camera stacking.
I can’t figure out how to update to 7.4.1. Here are screenshots of my Package Manager:
I don’t see any option to update to 7.4.1. Am I missing something? I’m running Unity version 2019.3.7f1. The documentation says 7.4.x requires minimum 2019.3.2f1.
Hi, @yuanxing_cai , any news on when can Render Features in the 2D Renderer will be available? Essentially, I want to render certain objects in the scene pixelated. I have an old complicated setup at the moment with a separate render texture and some custom shaders, but passing on the depth texture in such a way seems impossible, and there are other limitations that I encountered.
I was looking into replacing the system, when I found Custom Rendering Features. That’s exactly the tool I was looking for! But it’s not in the 2d renderer
I have tried using camera stacking with a combination of a 2D Renderer, and a separate normal forward renderer to at least get it going without the pixelized objects getting lit yet, but the _cameraOpaqueTexture seems to get lost between the two. So there’s really no way to get around it without having render features for now
Edit: For now I’ve set up a separate camera rendering to a quad, that then gets lit, though needless to say it’s not the best way to do it, and I can still only have all those objects on a single quad
Great, really looking forward to the Render Features in 2D! Any idea when we can expect it? Thanks
Also looking forward to this