UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

[Android] Gamma coloring seems to be applied to the video when it is not playing even though gamma is deselected in the shader

Open LukeFarrer opened this issue 7 months ago • 6 comments

Unity version

2022.3.34f1

Unity editor platform

Windows

AVPro Video edition

Core

AVPro Video version

3.2.2

Device hardware

Quest 3

Which Android OS version are you using?

12

Unity Graphics API

OpenGLES 3

Video API

media3/ExoPlayer

Texture format

Y Cb Cr 420_OES

Audio output

Unity

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

No response

Which output component(s) are you using?

Apply to Material

Any other component configuration required to reproduce the issue.

No response

The issue

When using OES to render videos, we notice that when the video is not playing, and the default texture is being used (ApplyToMaterial), that it seems to have gamma applied to it when the app is running. The AVProVideo shader being used is AvProVideo/Unlit/Opaque/Android OES Only. Even though "Apply Gamma" is deselected, the texture is having gamma applied to it as it appears much darker.

To reproduce this issue, simply press Play in the Unity Editor and stop the video. You will see the default texture is too dark as gamma has been applied even though Apply Gamma is deselected. If you then select Apply Gamma and then immediately deselect it, the texture then looks correct.

When the actual video is playing everything looks correct.

We are using Linear Color Space in the Unity project and URP.

What is the reason for this?

Media information

No response

Logcat output


LukeFarrer avatar Apr 14 '25 09:04 LukeFarrer