CommandBuffer attached to a camera and render to a render texture (not camera's render target)

I’m using unity built in render pipeline. I made a few shaders to add outlines to 3d meshes:

  • step1: render 3d meshes to a 2d render texture using CommandBuffer
  • step2: 2d render texture as input, add outline, then render to main camera render target

the issue I have right now:
If I use Graphics.ExecuteCommandBuffer to execute step 1, execution timeline would look like following:


our game already struggling to reach 30 fps on many cheaper devices, so doing a sync gpu call could be really bad.

but if I want to arrange step 1 command buffer to be executed asyncly, the best option seems to be Camera.AddCommandBuffer. If I used that, CommandBuffer.SetRenderTarget is overwritten by camera.renderTarget. (step 1 would directly output to main camera target texture instead of temp render texture)
I’m pretty new in rendering land, could u give suggestions what’s the best way to do? Do I must to have a dummy second camera here? best set up for the second camera so it almost a duplicate of the first one except render target?