Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'General Graphics' started by johanolofsson, Dec 12, 2021.

  1. johanolofsson

    johanolofsson

    Joined:
    Nov 21, 2018
    Posts:
    94
    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?
     
    bilalakil, F1Soda, omolen and 3 others like this.
  2. SnarkyPixel

    SnarkyPixel

    Joined:
    Jul 13, 2018
    Posts:
    19
    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):
    1. Change render target type
      • RenderTargetHandle renderTarget;
      • RTHandle renderTarget;
    2. Associate the shader property with the render target using RTHandles.Alloc instead of renderTarget.Init
      • renderTarget.Init("_ShaderProperty");
      • renderTarget = RTHandles.Alloc("_ShaderProperty", name: "_ShaderProperty");
    3. Assign temporary render texture using the shader property identifier
      • cmd.GetTemporaryRT(renderTarget.id, targetDescriptor, filterMode);
      • cmd.GetTemporaryRT(Shader.PropertyToID(renderTarget.name), targetDescriptor, filterMode);
    4. Modify ConfigureTarget to use the new RTHandle instead of the old RenderTargetIdentifier
      • ConfigureTarget(renderTarget.id);
      • ConfigureTarget(renderTarget);
    5. 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!
     
    Last edited: Dec 15, 2021
  3. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    498
    I never use a new unity API, because in 90% of cases it will be deprecated or broken.
     
    funkyCoty, leegod, arkano22 and 3 others like this.
  4. SnarkyPixel

    SnarkyPixel

    Joined:
    Jul 13, 2018
    Posts:
    19
    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.
     
    nasos_333 likes this.
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Some of the required changes are documented here: https://docs.unity3d.com/Packages/c...iversal@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://forum.unity.com/threads/doc...rp-and-what-every-blit-function-does.1211508/

    Hope that helps.
     
    Last edited: Dec 16, 2021
  6. SnarkyPixel

    SnarkyPixel

    Joined:
    Jul 13, 2018
    Posts:
    19
    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.
     
    nasos_333 likes this.
  7. johanolofsson

    johanolofsson

    Joined:
    Nov 21, 2018
    Posts:
    94
    Awesome answer, Thanks! :)
     
    nebula2012 and SnarkyPixel like this.
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,210
    Thanks a lo for the insight on this, will try and fingers crossed :)

    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.
     
    Last edited: Mar 21, 2023
  9. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,433
    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.
     
    kayroice and nasos_333 like this.
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,210
    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.
     
    Last edited: Oct 31, 2023
    kayroice likes this.
  11. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,433
    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:eek: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:DoRenderLoop_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:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

    Assertion failed
    UnityEngine.Rendering.RTHandle:eek: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:DoRenderLoop_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:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)

    Assertion failed
    UnityEngine.Rendering.RTHandle:eek: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:DoRenderLoop_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:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)
     
  12. Nicopol

    Nicopol

    Joined:
    May 30, 2020
    Posts:
    4
    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?
     
  13. unity_Prince198823Q

    unity_Prince198823Q

    Joined:
    Jul 18, 2022
    Posts:
    2
    public static readonly RenderTargetHandle CameraTarget; What about this? What am I working with RTHandle instead? :(:(
     
  14. hexasiel

    hexasiel

    Joined:
    Apr 20, 2018
    Posts:
    3
    It seems to be "ScriptableRenderPass.k_CameraTarget" now, or just "k_CameraTarget" when used inside a ScriptableRenderPass.