Skip to content

[Windows] Video rendered to only one eye when using VR and a linear color space #2409

@NielsterHeijden

Description

@NielsterHeijden

Unity version

6.3.0f1

Unity editor platform

Windows

AVPro Video edition

Core

AVPro Video version

3.3.3

Device hardware

Windows + Quest 3

Which Windows version are you using?

11

Graphics API

D3D 11

Video API

Media Foundation

Audio output

Unity

Any other Media Player component configuration required to reproduce the issue.

StereoPacking = Monoscopic

Which output component(s) are you using?

Display uGUI

Any other component configuration required to reproduce the issue.

Unity color space should be set to linear

The issue

When playing back a non stereo video that is rendered to Display uGUI on a canvas rendered in world space. The video is only visible in the left eye, the right eye just renders a black plane.

When i switch the entire project color space to Gamma the video will be rendered correctly to both eyes.

Looking at the DisplayUGUI.cs file the following lines are the probable cause of the problem.

#if UNITY_PLATFORM_SUPPORTS_LINEAR
if (result == null && _mediaPlayer.Info != null)
{
if (QualitySettings.activeColorSpace == ColorSpace.Linear && !_mediaPlayer.Info.PlayerSupportsLinearColorSpace())
{
result = EnsureAlphaPackingShader();
}
}
#endif

This picks a shader that doesn't support the unity VR stereo rendering when the project color space is set to Linear. While it picks the default/UI shader when using the Gamma color space.

Media information

No response

Log output

Metadata

Metadata

Assignees

Labels

Bug 🐛Something isn't workingFixedA fix will be in the next release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions