WebcamTexture not reading alpha channel

I am facing an issue wherein I have a virtual camera outputting ARGB32 color data, which includes transparency. However, when I construct a WebcamTexture from this virtual camera device, the alpha of all pixels is always 255/1.0. How can I get Unity to properly use the transparency value from the source device?

I’ve never seen a webcam output an alpha channel. Are you sure that is a thing at the highest application level, which is likely where Unity reads it from? Or is it some special feature of a particular webcam such as a Kinect or something like that?

It’s the virtual camera output from VTube Studio (another Unity application), which I have confirmed with the developer is being output in ARGB32 format with alpha. Additionally, programs like OBS can read this virtual camera with transparency in ARGB32 format without issue.

I’m facing the same problem here:
Using python to stream R8G8B8A8 frames to a “Unity Virtual Camera” via pyvirtualcam,
but in Unity, WebcamTexture has an alpha texture format, but pixels are all opaque. I’ve checked with OBS that the streaming has transparency.

Still nothing about this?

I’m using Windows 11, Unity 2021.2.10f1

1 Like