'RenderTargetHandle' is obsolete: 'Deprecated in favor of RTHandle'

So we upgraded to 2022.1.b1 from a16 last week. Yet another weekend wasted on trying to make things that break work again. Fun fun in the sun…

However, things are working again but we get this warning:

warning CS0618: ‘RenderTargetHandle’ is obsolete: ‘Deprecated in favor of RTHandle’

We use RenderTargetHandles to refer to textures in compute shaders. In order to assign which handle is assigned to which texture in the shader we use handle.Init(“textureName”). How to do the equivalent using RTHandles?

6 Likes

Would indeed have been nice to have some more documentation on how to change the code from using RenderTargetHandle to RTHandle.

Looking at Unity’s own changes in this URP commit, I managed to convert my screen space effect to the new system.

Basic steps I took in my project (red is old, green is new):

  • Change render target type

  • RenderTargetHandle renderTarget;

  • RTHandle renderTarget;

  • Associate the shader property with the render target using RTHandles.Alloc instead of renderTarget.Init

  • renderTarget.Init("_ShaderProperty");

  • renderTarget = RTHandles.Alloc("_ShaderProperty", name: "_ShaderProperty");

  • Assign temporary render texture using the shader property identifier

  • cmd.GetTemporaryRT(renderTarget.id, targetDescriptor, filterMode);

  • cmd.GetTemporaryRT(Shader.PropertyToID(renderTarget.name), targetDescriptor, filterMode);

  • Modify ConfigureTarget to use the new RTHandle instead of the old RenderTargetIdentifier

  • ConfigureTarget(renderTarget.id);

  • ConfigureTarget(renderTarget);

  • Get the render texture identifier from the shader property

  • cmd.ReleaseTemporaryRT(renderTarget.id);

  • cmd.ReleaseTemporaryRT(Shader.PropertyToID(renderTarget.name));

Note that, according to the official documentation, Shader.PropertyToID remains the same for the entire runtime. So, caching its output in a static readonly property instead of making constant calls to it should be more efficient.

So far it seems to be working properly in my case, but I haven’t had that much time to test yet. Since Unity didn’t cache the ID in their official URP implementation I decided not to do it in the above example either, just in case.

Hope this helps!

65 Likes

I never use a new unity API, because in 90% of cases it will be deprecated or broken.

10 Likes

That’s unfortunately the price we pay for being on the bleeding edge. It’s absolutely best practice to pick a version and stick with it unless you are an asset creator and need to keep your assets up to date.

However, since I started my project in 2021.x and it suffers from dreadful iteration times, I keep updating to see if any progress has been made on that front. So far improvements have been disappointing, but at least the developers are talking about it.

I would switch to 2018.x LTS and stick with it if it weren’t for its now-ancient SRP and lack of OpenXR support.

1 Like

Some of the required changes are documented here: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@13.1/manual/upgrade-guide-2022-1.html That doc page covers both the changes needed for URP renderer features and how to switch to RTHandles.

In addition, here’s a lengthy discussion about blitting on URP and also about possiblity to use SRP Blitter API now that we have RTHandles in URP (just scroll to Unity staff comments):
https://discussions.unity.com/t/865204

Hope that helps.

6 Likes

Thank you, I must have missed that!

Also, good to know we can use the SRP Blitter API now. I ended up writing my own as Unity’s kept breaking in SPI XR, but I will be happy to give it up and have one less part to maintain myself if this replaces it and remains functional.

1 Like

Awesome answer, Thanks! :slight_smile:

2 Likes

Thanks a lo for the insight on this, will try and fingers crossed :slight_smile:

Unnecessary changes from Unity could just be avoided though, we do not need to suffer for being on the bleeding edge.

This could be months or years of extra work to convert to the new system.

I’m really exhausted. You guys change things too often and make it hard to keep up. As for urp in 2021, at least I had no problems making games. However, now, two years later, the past project has only been upgraded to the latest version of Unity in 2023, and all the urp graphic elements that worked well in the past are no longer available. A completely black screen is all I see when play game. I don’t know where to start or what to fix.
ngui did the same, and now unity’s own urp is like this.

5 Likes

This is indeed absolutely crazy an unthinkable to happen, reduces the trust the the engine to a million below zero every time a change like that that should Never Ever have happened is introduced.

Plus there is zero documentation or examples to follow for conversions, when something breaks.

What worry me more is that there is a plan to break just about everything, every single project in existance soon

I get some non sensical warning lately

warning CS0618: ‘RenderingUtils.fullscreenMesh’ is obsolete: ‘Use Blitter.BlitCameraTexture instead of CommandBuffer.DrawMesh(fullscreenMesh, …)’

This means half my image effect will break completely. Without any obvious way to fix them, at all and zero documentation or hints on what to replace that with.

Why would that be obsolete and not just converted to work with the new backend instead ?

Why would it ever be chosen to make it obsolete and break everything ?

Why would that ever be allowed to happen knowing there is thousands of projects that will be broken.

How is this warning even gone through as a choice ?

I cant even begin to grasp it.

2 Likes

So now, put aside things like complaints,

I just need fixable solution, how-to tutorials to these error I met.

When game play, I met these error hundreds times a second repeatedly when my game’s graphic should comes out normally.

Was had no error at unity 2021.1.16, but now met these error at unity 2023.1.17

And what is my URP’s version? Where I can find?

What URP versions adopted to what Unity versions?


Assertion failed
UnityEngine.Rendering.RTHandle:hushed:p_Implicit(RTHandle)
UnityEngine.Rendering.Blitter:BlitTexture(CommandBuffer, RTHandle, Vector4, Material, Int32)
UnityEngine.Rendering.Universal.Internal.CopyColorPass:ExecutePass(RasterCommandBuffer, PassData, RTHandle, Boolean, Boolean)
UnityEngine.Rendering.Universal.ScriptableRenderer:ExecuteRenderPass(ScriptableRenderContext, ScriptableRenderPass, RenderingData&)
UnityEngine.Rendering.Universal.ScriptableRenderer:ExecuteBlock(Int32, RenderBlocks&, ScriptableRenderContext, RenderingData&, Boolean)
UnityEngine.Rendering.Universal.ScriptableRenderer:Execute(ScriptableRenderContext, RenderingData&)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera(ScriptableRenderContext, CameraData&, Boolean)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, List`1)
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

ArgumentNullException: Value cannot be null.
Parameter name: value
at UnityEngine.Object+MarshalledUnityObject.ThrowException[TException] (System.String message) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.MaterialPropertyBlock.SetTextureImpl (System.Int32 name, UnityEngine.Texture value) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Blitter.BlitTexture (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle source, UnityEngine.Vector4 scaleBias, UnityEngine.Material material, System.Int32 pass) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.Internal.CopyColorPass.ExecutePass (UnityEngine.Experimental.Rendering.RasterCommandBuffer cmd, UnityEngine.Rendering.Universal.Internal.CopyColorPass+PassData passData, UnityEngine.Rendering.RTHandle source, System.Boolean useDrawProceduralBlit, System.Boolean disableFoveatedRenderingForPass) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.RenderingData& renderingData) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteBlock (System.Int32 blockIndex, UnityEngine.Rendering.Universal.ScriptableRenderer+RenderBlocks& renderBlocks, UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean submit) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData& cameraData, System.Boolean anyPostProcessingEnabled) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest) [0x00000] in <00000000000000000000000000000000>:0

Frame: 00935 frm_fps: 3.36 frm_ms/f: 297.62 CPU_ms/f: 249.72 GPU_ms/f 7.88 Total.Memory:2.18 GB, Mem.Allocated:574.48 MB, Mem.Reserved:809.42 MB, GPU.Allocated:1.03 GB, GPU.Reserved:1.12 GB, GC.Heap:106.81 MB, GC.Used:91.25 MB, LowLevel.Allocations:319.34 KB, External.Allocations:255.30 MB, Sys.FreeSpace:779.58 MB, Sys.Allocatable:779.00 MB
Unloading 188 unused Assets / (141.0 KB). Loaded Objects now: 177465.
Memory consumption went from 0.81 GB to 0.81 GB.
Total: 484.590052 ms (FindLiveObjects: 55.374063 ms CreateObjectMapping: 11.097344 ms MarkObjects: 415.057031 ms DeleteObjects: 3.059427 ms)

Unloading 2 Unused Serialized files (Serialized files now loaded: 39)
Render Pipeline error : the XR layout still contains active passes. Executing XRSystem.EndLayout() right now.
UnityEngine.Experimental.Rendering.XRSystem:NewLayout()
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, List`1)
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

Assertion failed
UnityEngine.Rendering.RTHandle:hushed:p_Implicit(RTHandle)
UnityEngine.Rendering.Blitter:BlitTexture(CommandBuffer, RTHandle, Vector4, Material, Int32)
UnityEngine.Rendering.Universal.Internal.CopyColorPass:ExecutePass(RasterCommandBuffer, PassData, RTHandle, Boolean, Boolean)
UnityEngine.Rendering.Universal.ScriptableRenderer:ExecuteRenderPass(ScriptableRenderContext, ScriptableRenderPass, RenderingData&)
UnityEngine.Rendering.Universal.ScriptableRenderer:ExecuteBlock(Int32, RenderBlocks&, ScriptableRenderContext, RenderingData&, Boolean)
UnityEngine.Rendering.Universal.ScriptableRenderer:Execute(ScriptableRenderContext, RenderingData&)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera(ScriptableRenderContext, CameraData&, Boolean)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, List`1)
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

ArgumentNullException: Value cannot be null.
Parameter name: value
at UnityEngine.Object+MarshalledUnityObject.ThrowException[TException] (System.String message) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.MaterialPropertyBlock.SetTextureImpl (System.Int32 name, UnityEngine.Texture value) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Blitter.BlitTexture (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle source, UnityEngine.Vector4 scaleBias, UnityEngine.Material material, System.Int32 pass) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.Internal.CopyColorPass.ExecutePass (UnityEngine.Experimental.Rendering.RasterCommandBuffer cmd, UnityEngine.Rendering.Universal.Internal.CopyColorPass+PassData passData, UnityEngine.Rendering.RTHandle source, System.Boolean useDrawProceduralBlit, System.Boolean disableFoveatedRenderingForPass) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.RenderingData& renderingData) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteBlock (System.Int32 blockIndex, UnityEngine.Rendering.Universal.ScriptableRenderer+RenderBlocks& renderBlocks, UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean submit) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData& cameraData, System.Boolean anyPostProcessingEnabled) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest) [0x00000] in <00000000000000000000000000000000>:0

Unloading 0 unused Assets / (Unknown). Loaded Objects now: 177473.
Memory consumption went from 0.81 GB to 0.81 GB.
Total: 485.765365 ms (FindLiveObjects: 56.825833 ms CreateObjectMapping: 11.488958 ms MarkObjects: 416.234896 ms DeleteObjects: 1.213646 ms)

Render Pipeline error : the XR layout still contains active passes. Executing XRSystem.EndLayout() right now.
UnityEngine.Experimental.Rendering.XRSystem:NewLayout()
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, List`1)
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

Assertion failed
UnityEngine.Rendering.RTHandle:hushed:p_Implicit(RTHandle)
UnityEngine.Rendering.Blitter:BlitTexture(CommandBuffer, RTHandle, Vector4, Material, Int32)
UnityEngine.Rendering.Universal.Internal.CopyColorPass:ExecutePass(RasterCommandBuffer, PassData, RTHandle, Boolean, Boolean)
UnityEngine.Rendering.Universal.ScriptableRenderer:ExecuteRenderPass(ScriptableRenderContext, ScriptableRenderPass, RenderingData&)
UnityEngine.Rendering.Universal.ScriptableRenderer:ExecuteBlock(Int32, RenderBlocks&, ScriptableRenderContext, RenderingData&, Boolean)
UnityEngine.Rendering.Universal.ScriptableRenderer:Execute(ScriptableRenderContext, RenderingData&)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera(ScriptableRenderContext, CameraData&, Boolean)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, List`1)
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

ArgumentNullException: Value cannot be null.
Parameter name: value
at UnityEngine.Object+MarshalledUnityObject.ThrowException[TException] (System.String message) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.MaterialPropertyBlock.SetTextureImpl (System.Int32 name, UnityEngine.Texture value) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Blitter.BlitTexture (UnityEngine.Rendering.CommandBuffer cmd, UnityEngine.Rendering.RTHandle source, UnityEngine.Vector4 scaleBias, UnityEngine.Material material, System.Int32 pass) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.Internal.CopyColorPass.ExecutePass (UnityEngine.Experimental.Rendering.RasterCommandBuffer cmd, UnityEngine.Rendering.Universal.Internal.CopyColorPass+PassData passData, UnityEngine.Rendering.RTHandle source, System.Boolean useDrawProceduralBlit, System.Boolean disableFoveatedRenderingForPass) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteRenderPass (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.ScriptableRenderPass renderPass, UnityEngine.Rendering.Universal.RenderingData& renderingData) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.ExecuteBlock (System.Int32 blockIndex, UnityEngine.Rendering.Universal.ScriptableRenderer+RenderBlocks& renderBlocks, UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData, System.Boolean submit) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.ScriptableRenderer.Execute (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData& cameraData, System.Boolean anyPostProcessingEnabled) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, UnityEngine.Object renderRequest) [0x00000] in <00000000000000000000000000000000>:0

Render Pipeline error : the XR layout still contains active passes. Executing XRSystem.EndLayout() right now.
UnityEngine.Experimental.Rendering.XRSystem:NewLayout()
UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack(ScriptableRenderContext, Camera)
UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render(ScriptableRenderContext, List`1)
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

Hi, I have the same issue, I get the warning message about RenderTargetHandle being obsolete, so how can I get this:
RenderTargetIdentifier RTHandleIdentifier = RenderTargetHandle.CameraTarget.Identifier();
working with RTHandle instead?

public static readonly RenderTargetHandle CameraTarget; What about this? What am I working with RTHandle instead? :(:frowning:

It seems to be “ScriptableRenderPass.k_CameraTarget” now, or just “k_CameraTarget” when used inside a ScriptableRenderPass.

2 Likes

Bleeding edge of what? Bleeding edge of shit? The Render Graph API is horribly documented, has almost no support, deprecates tons of stuff without any obvious replacement, the errors are useless, they managed to double the boilerplate while making everything more complex with worse performance. I hate this engine so much

3 Likes

About exactly what i think, and this is generally true for all of URP and HDRP project, is just a useless addition imo when could just improve the far more easy to use, stable and fast BiRP

What my development has been like in last years

Assets\ARTnGAME\EXTRAS\fAmbientOcclusion\fAmbientOcclusionFeature.cs(563,85): warning CS0618: ‘ScriptableRenderPass.colorAttachment’ is obsolete: ‘Use colorAttachmentHandle’
.
Assets\ARTnGAME\GIBLI\SHADING\FALLS\PlanarReflections.cs(252,13): warning CS0618: ‘UniversalRenderPipeline.RenderSingleCamera(ScriptableRenderContext, Camera)’ is obsolete: ‘RenderSingleCamera is obsolete, please use RenderPipeline.SubmitRenderRequest with UniversalRenderer.SingleCameraRequest as RequestData type’
.
Assets\ARTnGAME\Orion Space Framework\0 URP\FULL VOLUME NEBULA\BlitPassFullVolumeNebulaSRP.cs(1696,30): warning CS0618: ‘RenderingUtils.fullscreenMesh’ is obsolete: ‘Use Blitter.BlitCameraTexture instead of CommandBuffer.DrawMesh(fullscreenMesh, …)’
.
Assets\ARTnGAME\EXTRAS\fAmbientOcclusion\fAmbientOcclusionFeature.cs(92,86): warning CS0618: ‘ScriptableRenderer.cameraDepthTarget’ is obsolete: ‘Use cameraDepthTargetHandle’
.
Assets\ARTnGAME\Lumina\Scripts\VolumetricLightedSEGI.cs(478,29): warning CS0618: ‘ScriptableRenderPass.Blit(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, Material, int)’ is obsolete: ‘Use RTHandles for source and destination’
.
Assets\ARTnGAME\Lumina\Scripts\VolumetricLightedSEGI.cs(39,62): warning CS0618: ‘RenderTargetHandle’ is obsolete: ‘Deprecated in favor of RTHandle’
.
Assets\EXTERNAL 1\Unity-URP-Outlines\Outlines\Scripts\RendererFeatures\ScreenSpaceOutlines.cs(92,13): warning CS0618: ‘ScriptableRenderPass.ConfigureTarget(RenderTargetIdentifier)’ is obsolete: ‘Use RTHandle for colorAttachment’
.
And my latest favorite, beating everything above by far !
.
Everything you made is obsolete, use Render Graph instead.

1 Like

I noticed you discovered the thread on RenderGraph but for everyone else, you can get support for upgrading to RenderGraph in [this thread]( https://discussions.unity.com/t/930355 page-7#post-9787632). We have early documentation, a dozen code samples that are shipped through the package manager, and many in depth responses to your questions. Let us know there what learning materials you would still need. On the boilerplate, we just landed a few helper functions that limit the boilerplate. These will be available in the next patch release together with the updated samples. On the performance, please let us know in the thread what you are encountering, performance should not regress. We’re seeing big bandwidth savings on mobile to reduce energy consumption, and other GPU improvements depending on the use case. The risk with RenderGraph was the additional CPU cost but we managed to shave that off and are seeing no regression compared with 22LTS.

I’m more annoyed that you’re trying to be backward compatible with like 3 other rendering systems you’ve made over the last few years, meaning if I try and google something I have to sift through tons of outdated info, like nasos_333 said you end up implementing something with one method only to find out it’s obsolete, ad infinitum. If you want to implement something like the render graph that’s fine but I’d rather you just remove all the old stuff completely and go all in

2 Likes

All those changes should be 100% transparent to end user and only affect the backend, there is zero reason to move this to front end like it happens now. Including the URP and HDRP pipelines and the latest Render Graph.

E.g when choose Render graph, just in the back replace all functions with render graph ones, anyway the safe pass uses the exact same code, so essentially there is zero need to complicate things in the front end, maybe only by user choice if want to use the Graph, then have a separate API to go to that.

Btw, there is still not safe way to do a URP on demand camera render and i still have not found the way to grab a depth normals texture in renderer feature in Render Graph, or enable a GBuffer pass in Forward or Forward+, those were trivial in before Render Graph system, now have spent weeks trying and would be great if could have some examples on those, to help us with the desperate times.

I very much understand that sentiment. And going all in would have made things much easier of our own developers for sure. It does not seem what’s best for many users though. In the thread, you can see how important the Compatibility Mode is for many users and asset providers. It allows you to upgrade your project and have it running without needing to port to RenderGraph first. I think also Nasos is making the point in that thread that we need to have backwards compatibility for a long time.

What we wanted to avoid is shipping first an unfinished experimental system, that then stays unfinished for multiple releases while have multiple redundant systems for a long time.In the Unity context, where upgradability is very important, and there is a huge ecosystem that needs time to transition, making RenderGraph the default is the most “all-in” we can be. The aim is to make it clear what you should use if you start from scratch and the system is stabilizing and maturing much faster.

Now all the URP internals, the HDRP internals, and the URP extension API use RenderGraph. Next is for HDRP to use the same RenderGraph extension API to consolidate everything to a single stable RenderPass definition.

We fully realize the impact for you of this transition and have explored all options to minimize the impact while still progressing towards an improved pipeline. If you have concrete suggestions for learning materials that can help let us know in [the thread]( https://discussions.unity.com/t/930355 page-7#post-9787632).

1 Like