I’m loading all my levels inside one frame and rendering them into PNG files. The RenderTexture is created properly I output it into UI element and it looks correct.
Is it possible to ReadPixels inside one frame multiple times like this?
I’m loading all my levels inside one frame and rendering them into PNG files. The RenderTexture is created properly I output it into UI element and it looks correct.
Is it possible to ReadPixels inside one frame multiple times like this?
Is it RenderTexture.current or there’s another texture? Also, afaik you need texture2d to read pixels from render texture.
Sorry I edited the post. There might have been an error and current render target wasn’t an rt. Then I set it to RT and still had issues.
Currently I just grab straight from the screen inside a coroutine loop that loads levels, renders after the end of frame. One level per frame.
To answer the original question in case if someone find it (and so I know for the future), should ReadPixels() work immediately after camera.Render() to rt?