Search Issue Tracker

Fixed in 2018.2

Votes

31

Found in

2017.2.0b11

2017.2.0f2

2017.3.0b1

Issue ID

962142

Regression

Yes

[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 (19)

  1. D40ed9727d7be0dbf1b368d8092082a3?d=mm

    cozyurt_unity

    Jul 10, 2020 21:43

    www.patilimama.com kedi konserve mamaları

  2. 457a4318608d201f5a88c7706b489dd5?d=mm

    CrowGlow

    Feb 17, 2020 19:59

    Unlit/Transparant at material/Shader may work fine!

  3. 3b03d455940ab6d67b904f95e9cfcd2d?d=mm

    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.

  4. 040e156173ba5d6e7fa458011862611e?d=mm

    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" :)

  5. 040e156173ba5d6e7fa458011862611e?d=mm

    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);
    myRTTarget.Create();
    [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!

  6. B965c3693288a27b20bf7b55e0527884?d=mm

    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.

  7. A2b30891a38bf4d9585bc369e07924ca?d=mm

    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!

  8. Dccaf85fd3c8d88848779d5d279bb7e4?d=mm

    chadidi97

    Mar 17, 2018 12:11

    The issue still exists in 2017.3.1f1 please fix asap.

  9. 996f99c08d9c20a86b1bb2e72b167bc6?d=mm

    tracetronic

    Mar 16, 2018 11:14

    Still exists in 2017.2.1f1

  10. 3f3d2dd908207b795e6f18f3de6e0fff?d=mm

    Ghaleon25

    Mar 12, 2018 14:01

    Tried both workaround but on dark areas, there are bad artifacts and you can clearly see the difference in quality if you play the video outside of unity.
    Any idea if this will be fixed soon or if there is a better workaround?

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.