Hello, I am trying to render a YUV420 image color space into a Texture2D object. I relied on this link from StackOverflow and I set the shader as it is. Afterward, I load the data and I try to feed the tex as Texture2D(dimension.width, dimension.height, TextureFormat.RGB24, false); through the tex.LoadRawTextureData(pImage, pImageSize); which the pImage is a pointer. Although, I know the fact that a YUV420 image has half-size than RGB but I can't set the Texture2D with the appropriate TextureFormat. Do you have any suggestions?
Hi @dimatsiak, we do not support the YUV420 texture format currently. You can find more details of the supported formats here: https://docs.unity3d.com/2021.1/Documentation/ScriptReference/TextureFormat.html It is unconventional to support a 12-bit texture. You can consider using a 16-bit texture and bit manipulation to read the data.