I’m overwriting a portion of a WebCamTexture texture with another texture and I found it very strange that ( according to the ScriptingAPI ) using WebCamTexture GetPixels() lays out the pixels top to bottom which seems bizarre, but to twist things up even more by using a different approach, the Texture2D GetPixels() lays the pixels out bottom to top, which seems normal since origin is always bottom left when working with grids in mathematics.
Is there a logical reason for this?? The only thing I can think of is that the native devices return the pixels that way top to bottom, but that seems awful strange.
No, and in fact there have been bugs at various times in Unity’s history that reverse or restore this.
The Webcam class (like ALL things video) is notoriously flaky, reliant on a stack of device drivers (usually written by “the new guy” at each hardware vendor) that have to interoperate with all manner of weird layers of video and audio and digital rights management crud (usually specified by vendor and/or committee) all the way down to the actual hardware.
Honestly I’m amazed they work at all. 
2 Likes
Ya, I have stumbled across various posts of people working through WebCamTexture bugs and they date way back. Seems like the class is a low priority maintenance wise for Unity. Anyhow, thanks @Kurt-Dekker .
1 Like