UnityChromakey icon indicating copy to clipboard operation
UnityChromakey copied to clipboard

Shader not working

Open tomihr opened this issue 3 years ago • 8 comments

Hello, I have tried your shader, created material, and assigned it to the plain. I have added a demo video to the VideoPlayer component and set Render Mode to Material Override. I can hear sounds from the video but Playn is empty nothing shows up, I am working in SRP. Thanks

tomihr avatar Feb 03 '22 09:02 tomihr

Hey tomihr,

First: what unity version / pipeline?

Second: It sounds as though maybe the material isn't setup correctly or the media isn't working for some reason. Could you try taking the shader and putting it on a quad then dragging a texture into the maintex slot? Find a still frame of some greenscreen footage to test with. If that doesn't work, take a screenshot of your setup and post it here.

Thanks!

otdavies avatar Feb 04 '22 19:02 otdavies

Hello, I am working in Unity 2020.3.25f, SRP Standard render pipeline. And all I get when I drag an example image from a folder to a shader is an empty plane. Screenshot_1

tomihr avatar Feb 07 '22 07:02 tomihr

Hmm, very strange. I'll take a look at that tomorrow. Thanks for letting me know.

otdavies avatar Feb 07 '22 08:02 otdavies

Here is a screenshot with a simple setup Screenshot_2 .

tomihr avatar Feb 07 '22 10:02 tomihr

Hello. I've just encountered the same issue using the 3drp using Unity 2020.3.20f

Project-NSX avatar Feb 10 '22 16:02 Project-NSX

Noted, working on figuring out the cause to this. Thanks for the reports.

otdavies avatar Feb 12 '22 12:02 otdavies

As a side note, I solved this by upgrading the project to use URP. Also just to let you know, this works perfectly in VR. If the dev is using single-pass instance as the render mode then following this document will let them upgrade the shader for use with the single-pass render mode: https://docs.unity3d.com/Manual/SinglePassInstancing.html

Project-NSX avatar Feb 12 '22 12:02 Project-NSX

To solve this in SRP, try removing these lines from the shader:

"RenderPipeline"="HDRenderPipeline"
"RenderType"="HDUnlitShader"

That should be a work around for now. I am working on providing a version of the shader for each pipeline with shadows + some other features.

otdavies avatar Mar 14 '22 19:03 otdavies