- Home /
Question by
JoelCorominas · Jan 18, 2019 at 01:54 PM ·
graphicstexture2d
Graphics.coptTexture
Hi everyone, Im trying to send a video stream over a local network and i have a performance issue with the function Texture2D.ReadPixels, the code with this function works with get so slow, so I´m trying to use Graphics.CopyTexture() but I cant make it works and i didn´t find to much documentation about.
if (!GPU)
{
RenderTexture.active = rawImage;
frameToSend.ReadPixels(new Rect(0, 0, rawImage.width, rawImage.height), 0, 0);
frameToSend.Apply();
}
else
{
RenderTexture.active = rawImage;
Graphics.CopyTexture(rawImage, 0, 0, frameToSend, 0, 0);
frameToSend.Apply();
}
Thank you.
Comment
Your answer
