I am looking for an option to add custom pass (Custom Renderer Feature) to a 2D Renderer.
Currently there are functions like EnqueuePass etc., but there is no way, to do it in the correct order
(as 2D Renderer doesn’t have any callbacks).
With the Forward Renderer, we have the feature list, but with the 2D Renderer there is nothing like that.
So, my question is - how to use Custom Renderer Feature with 2D Renderer?
So, basically there is no way to use scriptable render pass in 2D renderer.
I’ve implemented this by myself, and it works just like URP custom render features. It was just like 5 lines of code.
You can find my SRP fork here GitHub - Erdroy/ScriptableRenderPipeline: Scriptable Render Pipeline
Also PR went live right now, and it’s waiting for approval.
The reason why we haven’t added custom render feature support to the 2D Renderer is we want our users’ feedback to focus on the 2D lighting system itself, as it’s still experimental. After we get the 2D Renderer ready for production, we’ll then allow user customization.
This capability is becoming more and more requested as render features are showing very useful in URP (for instance to make full-screen custom effects). Is there any update on this? /cc @yuanxing_cai
Our sole focus right now for the 2D Renderer is performance, especially mobile performance. This is of paramount importance for us to be production ready. That’s why everything else needs to take a back seat at the moment.
@yuanxing_cai or @Chris_Chu , can either of you give an update as to when either Custom Volume Overrides or Custom Renderer Features will be available in URP’s 2D Renderer? I’m using URP-10.3.1 (Unity 2020.2.5f1) and need some way to apply a full screen custom post processing effect when using URP and the 2D Renderer (not the Forward Renderer) that doesn’t rely on render textures. Thanks.
Hey, what is the current state of custom renderer features? I am currently developing a lot of stuff by myself with render textures, but I wonder if I should wait a bit. I also found this GitHub link that adds renderer features to the 2D renderer if anybody is interested. I really liked how it all works in the HDRP and expect it to be similar.
I also don’t see any updates on the roadmap page for the URP.
I’m curious to know too if there are any updates regarding Render Features for the 2D renderer?
Also, side question: why are we limited to only 4 Light Blend Styles in the renderer? Thanks!
Heya, just tested with 2021.2.10, it seems that I can put in the CustomRender Feature but there seems to be no effect on the Sprite Renderers and the feature only affects the camera background. I’m trying to use URP and make a shader for post-processing on the camera. Is it just incomplete in this version of Unity and if so, what is an alternative that I can pursue. I am using Cinemachine so I dont know how effective Camera Stacking would be. I might be missing something but there should be an easy way to add shaders to the camera? I know there used to exist ways to accomplish this on LWRP.
@anhadrs , so the good news is that you can apply a custom shader to a camera for a full screen post-processing effect, which sounds like what you are trying to accomplish. I can also confirm that if you want to use camera stacking that’ll work just fine (not required though afaik), and if you also are using Cinemachine that’ll work as well (also not required). I’m assuming that since you are on 2021.2.10 that you’re also using URP-12.x, which are the versions I’m using.
The way that I’m doing this is to use URP_BlitRenderFeature to create a render feature that I can then assign an arbitrary material to. I use the Before Rendering Post Processing event, and apply the effect to Camera Color. You can try different events though, that’s just the one that worked for me (I think there was a bug in URP_BlitRenderReature preventing the two After Rendering events from working that has since been fixed; I haven’t tested the latest commit though). Just make sure that after you add the custom render feature to your 2D Renderer Asset Data (or the Forward Renderer Asset Data if that’s what you’re using) that your camera is also configured to use that particular renderer. You’ll be able to select the renderer under Camera → Rendering → Renderer in the inspector.
Might be worth mentioning that on versions of URP prior to URP-12.x I couldn’t get the 2D Renderer to work with custom render features (I believe that functionality wasn’t supported), and instead had to use the Forward Renderer along with camera stacking as outlined here .
Having said all this, it’d be great to know if(?) or when URP will support custom volume overrides as that should make this process a little more straightforward.