RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
231 stars 28 forks source link

Help!Why NGUI Color distortion #348

Closed caihuazei2012 closed 4 years ago

caihuazei2012 commented 4 years ago

Describe the bug Linnear Space, which is also used, uses unity's videoplayer, and the video color is the same. After importing the plugin, it becomes white in NGUI Supplement: I use NGUI. Your Setup (please complete the following information):

To Reproduce

Logs If applicable, add error logs to help explain your problem.

Screenshots On the left is the effect of using videoplayer or AV Display UGUI, on the right is the effect of the Apply To Texture Widget NGUI 企业微信截图_15888186204116

This is android setting 企业微信截图_15888402954170

企业微信截图_15888413742407

left is NGUI ,right is UGUI

480609fa2a963f3be11183939f0f17d

Videos If applicable, add a copy of your video or the URL

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Instead email the link to us unitysupport@renderheads.com

DragontaleStudio commented 4 years ago

Hello all,

We are having the same issue (color distortion), using UGUI on android builds.

Image ios vs android

Screenshot_20200511-133557

AndrewRH commented 4 years ago

Hi @DragontaleStudio, it's actually a different but similar issue. Please provide us with which version of Unity and AVPro Video you're using. We did fix UGUI recently for Linear mode, so it's best if you're on the latest version of the plugin (1.10.3 now, and 1.11.0 later today).

Thanks,

DragontaleStudio commented 4 years ago

Hello @AndrewRH. Thanks for your prompt answer. We are using unity 2019.3.9f1 and avpro version 1.10.3 (full ios, not trial)

AndrewRH commented 4 years ago

Thanks @DragontaleStudio we're investigating....

AndrewRH commented 4 years ago

Both of these issues are caused by the Unity colorspace setting being set to Linear. If you set to Gamma then the problem will resolve. This isn't the ideal solution though, because it's meant to work in both, so we're looking into it.

DragontaleStudio commented 4 years ago

Thanks @AndrewRH. We changed colorspace to gamma for the time being. Please let us know once the issue is resolved.

AndrewRH commented 4 years ago

@RenderHeadsSte I think we may just have an #ifdef wrong or something - perhaps you could take a look? DisplayUGUI should support displaying content when Unity is in Linear colourspace correctly....If it detects the platform can't do it natively, then it uses the shader to do the conversion...

Ste-RH commented 4 years ago

@DragontaleStudio Can I ask if you are using the 'Fast OES' option?

DragontaleStudio commented 4 years ago

@RenderHeadsSte I suppose it is the "Use Fast OES path" on android settings. No we don't have it enabled. Moreover we are using a material on DisplayUGUI that help us mask it.

AndrewRH commented 4 years ago

Oh if you're using your own material, then that's the cause... We have our own shaders to handle things like gamma/linear etc when displaying using UGUI, but if you override the material/shader on the component, then our shader will not be used. Is there no way you could achieve the same mask effect but using another UGUI component placed at a higher layer?

DragontaleStudio commented 4 years ago

Hey @AndrewRH. I suppose iOS doesn't have same issue cause it is doing it natively? Is that correct? We will try to use AVpro shader and mask component at a higher level as suggested and let you know.

caihuazei2012 commented 4 years ago

I use pow(color,2.2) resolve this

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.