Hi guys, I don’t want this to come off as a rant, but I’ve been trying to figure out how to configure my 2D project so that I can use the 2D Lights system and do a couple other custom rendering things, and after two weeks of researching I still don’t know how to do what I want to do. Everything I read is either outdated or doesn’t work with URP (grabPass, etc), or there is seemingly zero information or examples on. I would seriously appreciate a bit of help here. I’ve spent days researching and learning techniques to do custom rendering, only to find out that it can’t be done either due to URP limitations or other reasons.
Overall, what I’m looking to do is create a project that can:
-
Use 2D lights system (love it, and it works great)
-
Do some custom rendering (I made this post showing a “reflection” effect I’m trying to do: [Possibly Noob Question] Do I need to make an SRP to do this effect? )
-
Do an effect like “heat distortion” (I don’t know whether you’d consider that post processing or not)
I’ll try to narrow down my thoughts to a couple specific questions:
1) In my previous post above (the one about reflections) @Shane_Michael gave me a nice detailed description on how I could create that effect. The immediate problem I have is that the “2D Renderer Data Asset” (the one that you drag into the Renderer List in the “UniversalRenderPipelineAsset”) doesn’t have any option to add Renderer Features:
As opposed to the “Forward Renderer” which has an option to add them:
Am I missing something here? Can I not do any custom rendering with the 2D Renderer? Whats the deal? Can I use the 2D Lights with a Forward Renderer, so that I can add my own Renderer Features, or do they only work with the 2D Renderer? Is the 2D Renderer just a custom-made Forward Renderer, and I could copy its layout and then make my own Forward Renderer based on that? I can’t find a single bit of information on this
[MINOR POST UPDATE]
I opened up both the “Forward Renderer.asset” and the “2D Renderer Data.asset” in notepad. Both of them have the “m_RendererFeatures: ” array. This would lead me to believe that I should be able to add RendererFeatures to the 2D Renderer… but how?
2) GrabPass has been removed and has been “replaced” by _CameraOpaqueTexture. Please correct me if I’m wrong, but isn’t this completely useless for a 2D game since everything is rendered during Transparent? Is there some new way to do the equivalent of a GrabPass during Transparent? Maybe after Transparent has finished rendering? To be super specific, what I’m looking to do is make a heat-distortion trail/arc effect when an enemy swings their weapon.
I’ve read probably like 20 posts about this. Some people had solutions, some didn’t.
At the end of this post, @Elringus responded with info that seems useful: SRP and grabpass with transparent.
At the end of this post, @phil_lira responded with good info: The scriptable render pipeline how to support GrabPass?
But again, how can I do any of that with the 2D Renderer?
3) Are there ANY examples of ANY sort of custom rendering for a 2D game using the 2D Renderer?
This seems to be what everyone suggests looking at for examples using URP, but they are all 3D: GitHub - Unity-Technologies/UniversalRenderingExamples: This project contains a collection of Custom Renderer examples. This will be updated as we refine the feature and add more options.
This link shows FEATURES of the 2D Renderer, but nothing custom about rendering: GitHub - Unity-Technologies/2d-renderer-samples: Samples for Unity's 2D Renderer
Again, I’m sorry if this post is coming off as a rant, but this is the culmination of WEEKS of research and testing and never coming to a solution. Instead of reading official documentation, I feel like I’ve been trying to piece together tidbits of information from pages and pages of posts on this forum. It’s very frustrating. I’m not trying to do anything out of the ordinary, I just want to use the 2D Lights system along with some run-of-the-mill effects.
Thanks for reading my post, and again, sorry that this sounds so complain-y