I’m using RenderPipelineManager.endCameraRendering in a scene where we have a number of cameras, with usually two active at a time (one camera rendering to a RenderTexture, and another pointing at a mesh showing that RenderTexture). We are assigning RenderPipelineManager.endCameraRendering once to a function (not attached to a camera), and then cameras are enabled/disabled during play as needed.
In Unity 2019.1 (HDRP 5.16.1) this worked great, the callback was always called every time an active camera was done rendering, but in 2019.2 (HDRP 6.9.1) it only works with some cameras; in those cases it’ll be called on only one of the two active cameras. Any idea what changed?
Figured out the change - custom render functions (HDAdditionalCameraData.customRender) used to call endCameraRendering afterwards, they no longer do.
Original code from HDRenderPipeline.cs:
if (skipRequest)
{
// Submit render context and free pooled resources for this request
renderContext.Submit();
GenericPool<HDCullingResults>.Release(cullingResults);
UnityEngine.Rendering.RenderPipeline.EndCameraRendering(renderContext, camera);
continue;
}
Same code from HDRP 6.9.1:
if (skipRequest)
{
// Submit render context and free pooled resources for this request
renderContext.Submit();
GenericPool<HDCullingResults>.Release(cullingResults);
continue;
}
So…yeah, we need a way to have the callback happen after submitting the render context.
Hello, this call seems to have disappeared when we added the support for the probes to call Begin/EndCameraRendering callbacks.
This issue should be addressed in the package 7.1.0 (here is the PR that fixes it: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/4291)