0 votes
by (320 points)

In optimization work we want to know if is it possible to use GPU optimized function to copy a RenderTexture on Pico G2 4K and Unity Legacy XR SDK.

Function we want to use :

Graphics.CopyTexture(inputRenderTexture, StreamTexture);


var asyncGPUReadback = AsyncGPUReadback.Request(inputRenderTexture, 0);
        StreamTexture.SetPixelData(asyncGPUReadback.GetData<byte>(), 0);

Nowadays we use

StreamTexture.ReadPixels(new Rect(0, 0, inputRenderTexture.width, inputRenderTexture.height), 0, 0);

But it's extremely performance consuming.

Graphics.CopyTexture seems to be the key but we don't now how to use it correctly or if it work on the device. We only have a blank texture after the copy.

Thanks for helping

1 Answer

0 votes
by (5.9k points)

Maybe you could pack an APK for android phone (android 10) .
See if it works on the android phone first.

by (320 points)

thanks for your response

Graphics.CopyTexture is hardware dependent according to unity documentation.