Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

endCameraRendering in HDRP is broken?

Discussion in 'Graphics Experimental Previews' started by drcrck, Jun 4, 2019.

  1. drcrck

    drcrck

    Joined:
    May 23, 2017
    Posts:
    328
    Code (csharp):
    1.  
    2. void Awake(){
    3.   RenderPipelineManager.beginCameraRendering += OnBeginCameraRendering;
    4.   RenderPipelineManager.endCameraRendering += OnEndCameraRendering;
    5. }
    6. void OnBeginCameraRendering(ScriptableRenderContext context, Camera camera) {
    7.    context.ExecuteCommandBuffer(commandBuffer1);
    8. }
    9. void OnEndCameraRendering(ScriptableRenderContext context, Camera camera) {
    10.   context.ExecuteCommandBuffer(commandBuffer2);
    11. }
    12.  
    As I understand, it will execute these command buffers before and after (any) camera rendering.
    But here is what it actually does:


    upload_2019-6-4_7-45-4.png

    Both beginCameraRendering and endCameraRendering are executed in a row, before rendering.
    Not sure, if I'm doing something wrong, or it's just another broken feature?
     
  2. remi_unity163

    remi_unity163

    Unity Technologies

    Joined:
    Jun 19, 2018
    Posts:
    16
    Hello,

    There is indeed an issue. The endCameraRendering callback is not called at the right time in HDRP. We will work on it.

    Thank you
     
  3. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    Hi, is this related to URP too?
    I posted a while ago.
     
  4. SimSjB

    SimSjB

    Joined:
    Jan 23, 2017
    Posts:
    4
    Hello,

    Has this issue been addressed in a newer version of Unity or is there an issue submitted in the issue tracker?

    Thanks
     
  5. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    beginCameraRendering and endCameraRendering totally broken in HDRP (Unity 2019.3.5f1). This has been broken for ever, so I assume there is not intention to fix this/
     
  6. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Can you be more specific? I've been using BeginCameraRendering on HDRP for a long time (since HDRP 5.x?) and it's been functional even on my latest experiments. No idea about End counterpart though, never used it.
     
    Raul_T likes this.
  7. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Can confirm, we are using them for an asset store product since 5.7.1 and they always worked and still work on latest HDRP for us.
     
  8. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    312
    Not sure what version of Unity are you using, but endCameraRendering never worked fine for us.
     
  9. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Our comments were to beginCameraRendering only, which you claimed being also totally broken:
    I believe endCameraRendering has been broken in past at least but I've never used so can't comment about it's current state.