Search Issue Tracker

Fixed in 2018.2.X



Found in




Issue ID




[Regression] [Win] Videos are dark when using Linear color space

Graphics - General


How to reproduce:
1. Download attached project file and open "1" Scene
2. Enter Play Mode (make sure Linear color space is selected in Player Settings)

Actual result: All videos are too dark when using the Linear color space. They are correct with the Gamma color space.

Reproduced with: 2017.1.2p2, 2017.2.0f3, 2017.3.0b6, 2018.1.0a1
Not reproduced with: 2017.1.2f1, 2017.2.b10, 2017.3.0a7

Regression since: 2017.1.2p1, 2017.2.0b11, 2017.3.0b1

Reproduced only with Windows.

Fixed in: 2018.2.0a6

Comments (21)

  1. samehfr

    Sep 07, 2020 15:08

    Reproduced on Windows 10

    Unity 5.5.1f1 Personal
    Android Studio 2.3
    Android SDK Tools 25.2.5

  2. samehfr

    Aug 21, 2020 05:26

  3. samehfr

    Aug 21, 2020 05:23

  4. CrowGlow

    Feb 17, 2020 19:59

    Unlit/Transparant at material/Shader may work fine!

  5. sound-and-vision

    Jul 05, 2018 17:54

    I applied RATT's fix and it works well with the Video Player Component in 2017.4.1f1.If you want a simple breakdown:

    - In Project Window: Create > Shader > Unlit Shader

    - Underneath the line: fixed4 col = tex2D(_MainTex, i.uv);
    add the following line:
    col.rgb = LinearToGammaSpace(col.rgb);

    - Create a new material: Create > Material
    - Select the new Shader
    - Drag that Material onto the GameObject where your Video Player Component is.
    - Enjoy life!

    Remember that if you upgrade your project to 2018.2 or above in the future, you might need to swap the shader back to the default Unlit Shader.

  6. rad1c

    Apr 30, 2018 13:35

    ergh, I meant "private RenderTexture myRTTarget;" OFC, but couldn't modify the comment once it was posted in an "oh no second" :)

  7. rad1c

    Apr 30, 2018 13:33

    Mark-Davis Mar 20, 2018 22:37 <--- LIFE SAVER, THANKS!

    For all those who just want to copypaste, create a class level "private RenderTexture targetRT;", have your UI RawImage ready, then in Awake()

    RenderTextureDescriptor rtDesc = new RenderTextureDescriptor([int_vidclip_width], [int_vidclip_height], RenderTextureFormat.Default, 24);
    rtDesc.sRGB = false; //Thank this to Mark Davis! :)
    myRTTarget = new RenderTexture(rtDesc);
    [your_ui_rawimage].texture = myRTTarget;

    And when you want to play a clip:
    myVideoPlayer.targetTexture = myRTTarget;

    Tada, untested joke-engine bug million-th workaround applied!

  8. Spanky11

    Mar 30, 2018 02:04

    FYI - This issue is definitely fixed in Unity 2018.1.0b12. I just upgraded from 2017.3 and had the dark videos, and they look great now.

  9. Mark-Davis

    Mar 20, 2018 22:37

    Hey guys - I just ran into the same issue, but found a workaround. Maybe this will help someone.

    Try using a RenderTexture as the target. An easy way to handle this is to link the RenderTexture to a RawImage. When you create the RenderTexture, in the RenderTextureDescriptor,
    set: desc.sRGB = false;

    Good luck!

  10. chadidi97

    Mar 17, 2018 12:11

    The issue still exists in 2017.3.1f1 please fix asap.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.