Search Unity

URP raw image transparency problem (Linear vs gamma color space)

Discussion in 'Universal Render Pipeline' started by wahntin, Apr 11, 2020.

  1. wahntin

    wahntin

    Joined:
    Sep 17, 2019
    Posts:
    83
    Hi,

    the two pictures below illustrate my problem (all tested in 2019.3.9f1 and 2019.3.5f1)

    1. A raw image with transparency rendered with the unity default renderer

    upload_2020-4-11_18-39-10.png

    2. The same raw image in URP (the default URP project):

    upload_2020-4-11_18-39-43.png

    Any idea on what might cause this?
    I have also attached the used PNG image.

    Best, Martin
     

    Attached Files:

    Last edited: Apr 12, 2020
  2. jooki

    jooki

    Joined:
    Jul 4, 2013
    Posts:
    3
    Same issue here, what's going on with simple transparency?
     
  3. wahntin

    wahntin

    Joined:
    Sep 17, 2019
    Posts:
    83
    Got a reply from a bug report I made:
    http://fogbugz.unity3d.com/default.asp?1239748_4fsovmbisqj86vvt

    Looks like the reason is that URP uses linear color space by default and the default render pipeline uses gamma.

    See https://docs.unity3d.com/Manual/LinearRendering-LinearOrGammaWorkflow.html

    Doing custom UI shader seems to be a good workarround for this:
    https://forum.unity.com/threads/linear-space-for-scene-gamma-for-ui.309016/#post-2328522

    I don't get why this is not done by unity by default, though.
     
    Garrettec likes this.