Problem with RenderTextures as RawImage.Texture

Hi all,

I got some problems using a RenderTexture as the Texture of a RawImage that is part of a Canvas.
If I use a standard Texture, everything works fine. Using a RenderTexture or even Sprite(2D and UI) causes trouble depending on its resolution. Let’s say, my screen resolution is 1280x720.
If I set a RenderTexture or Sprite with 1280x720 pixels as the RawImage texture of my canvas, it fills up the whole screen.
This works for most RenderTextures and Sprites that match the screens aspect ratio. But for some sizes it won’t work: 80x45 and 16x9 pixels. Both obviously match the aspect ratio, but both are compressed vertically and the top row of the virtual pixels is left empty. I can see all 80x45 or 16x9 pixels of the texture but they are not square! Their width is greater than their height. This results in a free row on top of the screen.
If I import an image as Texture (NOT as Sprite!), everything works fine. But since I would like to create the Canvas’ RawImage at runtime, I have to use RenderTextures.

Any idea, what is going on here?
Thanks in advance for all kinds of help and support.

garv3

No one? Really? :frowning:

EDIT: I found that it works with all power-of-two resolutions. Non-power-of-two textures seem to work too, but not all of them. Strange!