Search Issue Tracker
Fixed in 2018.2.X
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
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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Sub Mesh Mask" field in VFX Graph has no padding
- Source Generation with GeneratePropertyBag fails when using reserved keywords as variable names with @ prefix
- Prismatic ArticulationBody moves in opposite direction when using targetVelocity
- Shader Graph skybox material is rendered inccorrectly in builds when "Allow Material Override" or "Cast Shadows" are enabled and the "Deferred" Rendering Path is used
- Object motion is affected by incorrectly added rotation motion when importing animations
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
CrowGlow
Feb 17, 2020 19:59
Unlit/Transparant at material/Shader may work fine!
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.
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" :)
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!
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.
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!
chadidi97
Mar 17, 2018 12:11
The issue still exists in 2017.3.1f1 please fix asap.
tracetronic
Mar 16, 2018 11:14
Still exists in 2017.2.1f1
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?