Search Unity

Reading camera image in command buffer with Forward rendering and HDR & MSAA disabled

Discussion in 'Image Effects' started by Arsonistic, Nov 19, 2018.

  1. Arsonistic

    Arsonistic

    Joined:
    Dec 11, 2016
    Posts:
    13
    I've created an image effect using command buffers and it works perfectly in Deferred and Forward with HDR and/or MSAA. But the effect breaks in Forward Rendering with MSAA and HDR disabled. The camera's rendered image isn't stored in BuiltinRenderTextureType.CameraTarget when HDR & MSAA are disabled; reading from it returns only black. This was confirmed as intended behavior by Unity QA when I reported it as a bug.

    Is there a way to access the camera's rendered image using command buffers in Forward with HDR & MSAA off?

    Reading it through OnRenderImage will probably work for some effects, but I'd like to do everything in the command buffer for the flexibility that brings.