Search Unity

OnRenderImage with linear color space on android gammafies image

Discussion in 'Image Effects' started by DavidSWu, Mar 9, 2017.

  1. DavidSWu

    DavidSWu

    Joined:
    Jun 20, 2016
    Posts:
    183
    If I add a post effect to the camera like this:
    void OnRenderImage(RenderTexture source, RenderTexture destination)
    {
    Graphics.Blit(source, destination);
    }
    The result looks as if each pixel was square rooted, i.e. the result is washed out.
    I would expect (want) it to do nothing.
    This happens with any post effect that I add, but the simplest example is above.
    It seems like source or destination has its linear flag set incorrectly or possibly something somewhere else is not taking into account the fact that linear rendering is being used.

    Does anyone know of a solution or workaround?
    Thanks!

    David Wu