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

Add HDRP / URP(LWRP) support #76

Closed AndrewRH closed 2 years ago

AndrewRH commented 5 years ago

Currently the ApplyToMaterial/ApplyToMesh scripts don't work correctly. This is due to materina.mainTexture not working with HDRP, so it needs to be changed eg:

                //_material.mainTexture = texture;
                _material.SetTexture("_BaseColorMap", texture);

Have to see if anything else needs changing too.

Fragilem17 commented 5 years ago

Hi Andrew!

An LWRP Lit material where you could use the stereo packing would also be much appreciated. Best regards, Tom

hybridherbst commented 5 years ago

Add to that ShaderGraph subgraphs to do spherical mapping and all other kinds of stuff (e.g. RGB/YCrCb conversion etc) - that would help tremendously integrating AVProVideo into custom shaders in LWRP/HDRP.

0x00x0 commented 5 years ago

Hello to all,

I have issue with HDRP and your plugin. The issue is disappeared sphere after applied HDRP. Unity's material autoupgrade hasn't any effect. Shader on material is set to AVPro "inside sphere unlit (stereo + fog)" for VR. In material preview texture from video is displayed. Also I'm using "Update Stereo Material" component.

Unity 2018.3.14, plugin v1.9.12.

AndrewRH commented 5 years ago

Yeah, Unity can only upgrade that shaders to HDRP if they are known standard Unity shaders. For custom shaders (such as ours) you have to manually upgrade them: https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@6.9/manual/Upgrading-To-HDRP.html#ManualConversion

AndrewRH commented 5 years ago

We'll definitely take a look and see whether we can make this easier in the future

0x00x0 commented 5 years ago

Yeah, Unity can only upgrade that shaders to HDRP if they are known standard Unity shaders. For custom shaders (such as ours) you have to manually upgrade them:

I posted this issue here, as you asked me to it in thread on Unity forum. And thanks!

sourya-sen commented 4 years ago

+1 on this. HDRP support would be much appreciated.

AndrewRH commented 4 years ago

@sourya-sen HDRP support just requires a few adjustments....see the top of this thread. Or did you have some other issue?

sourya-sen commented 4 years ago

Sorry, that seems to work, I missed out on reading the whole thread and had tried to upgrade materials the normal way before.

AndrewRH commented 4 years ago

I've just done some tests with URP...It seems to work fine with most of our demos, as most of them use unlit shaders. The few demos we have that use lit shaders don't work, as lit shaders need to be changed to support URP. I don't think lit shaders are too useful for most video use cases, so I don't believe this is a huge issue. This is the same situation with HDRP I believe.

nsudalfl commented 3 years ago

It would be great to get support for Lit URP shaders. I'm making heavy use of multiple concurrent transparent lit videos that are composited in-world on a URP stack that is heavily committed to AVPro! It's easy to imagine scenarios where this is necessary, like in-game TV screens.

0x00x0 commented 3 years ago

@AndrewRH Can you upgrade VR insideSphere shader to use it with hdrp 4.1 in Unity 2018.4 or it's totally depends on hdrp version?

AndrewRH commented 3 years ago

@0x00x0 you should just be able to run unity's shader upgade menu option to convert InsideSphere shader to support HDRP because it's a non-lit shader.

0x00x0 commented 3 years ago

Hmm... I tried material upgrade in Unity 2018.4 with hdrp 4.1 installed shader on material didn't change. Btw, on 2019.4 with hdrp 7.5 sphere shader is working fine without material upgrade.

AndrewRH commented 2 years ago

SRP (UWP / HDRP) is supported for all of our shaders, as they are not lit. Our sole lit shader is not supported.

In the near future we will be adding support to resolve the video texture, so that it can just be used with any old shader.

Closing this issue now.