0

I Have a viewport and a scaled image inside like this:

enter image description here

both the images are scaled to 0.1 but the one inside the viewport is of less resolution
Is there anyway to fix this?

cak3_lover
  • 1,440
  • 5
  • 26

1 Answers1

0

The Viewport has a size, that size sets the resolution at which the contents of the Viewport will be rendered. And it does not have to match the size at which it is displayed (it could be stretched/scaled).

With the ViewportContainer you can decide if it will automatically set the size of the Viewport or if it will stretch it (scaling the ViewportContainer will also result in stretchering). If you prefer to not use the ViewportContainer※, set the size of the Viewport in the Inspector or form code.

※: For example, you can display a ViewportTexture with a TextureRect, which will give you more control on how it is displayed. But it is less convinnient to setup.

Theraot
  • 31,890
  • 5
  • 57
  • 86
  • so you're saying I'll have to resize each image to (1,1) and then scale the `ViewportContainer` using Rect? That would be really inconvenient as I'm trying to find a solution with respect to this [answer](https://stackoverflow.com/a/74177491/18005234) in context – cak3_lover Oct 30 '22 at 16:11