[RenderTexture] Graphics.Blit doesn't cover whole screen

Hello everyone,

I’m having trouble with blitting (i.e. Graphics.Blit()) my RenderTexture to the screen. The point is that I need to do it after all rendering is done (this will include the rendering of multiple cameras). The idea was to blit the final RenderTexture to the screen after the WaitForEndOfFrame() returns. So the blitting is done within a coroutine rather than within the OnRenderImage() method. This seems to work fine in the editor but not after building as a Windows standalone application. In the standalone app the rendertexture is visible as a tiny image in the lower left corner (see image).

In the documentation I couldn’t find anything that specifies whether it is allowed to use Graphics.Blit() after WaitForEndOfFrame() returns or not.

Do I somehow need to set a viewport for blitting?

I attached a small sample for testing purposes. Maybe this way it’s easier to see the problem.

Any help or comment appreciated.

Thanks and kind Regards,
Gregg

1439918–77234–$GraphicsBlitSample.zip (109 KB)

Bump. Anyone?

PS: The only alternative I see at the moment is to write a dll plugin and do the blitting myself, which I’d really like to avoid.

I have the same issue here. I’m calling Graphics.Blit() from OnGUI() right now, because it doesn’t seem to work in OnRenderImage().

I’ve tested locally on my windows 8 laptop and on a windows 8 tablet with the same result. The size of the square is 128x128 pixels on my laptop. It almost seems to me that this is related to some tile based rendering approach.

It seems that post processing effects are disabled for windows store. Is that related to this issue? I’m running unity 4.2.0f4 by the way.

I see an alternative besides writing a dll plugin and that’s just putting a large plane with a projective texture in front of the camera.

I’m not sure if the plane helps. Mainly because of the order in which the things would be rendered. But I’ll have a look at it!

I see a similar issue with a glow effect I am working on but it only effects iOS builds; still haven’t pinned down the cause of the issue.