Resize
Changes the size of a texture, with a choice of how the picture is scaled to the new frame.
Outputs
| Name | Type | Description |
|---|---|---|
| Output | Texture | The texture at the new size. |
Inputs
| Name | Type | Description |
|---|---|---|
| Input | Texture | The texture to resize. |
Parameters
| Name | Type | Description |
|---|---|---|
| Resolution | Vector 2 Int | The width and height of the output in pixels. |
| Scaling | Enum | How the picture is fitted to the new frame.Choices: None, Fit, Fill, Stretch |
| Anchor | Enum | The point of the picture that lies on the same point of the frame, which decides where empty space goes or which part is cut off.Choices: Top Left, Top, Top Right, Left, Center, Right, Bottom Left, Bottom, Bottom Right |
| Filteradvanced | Enum | How a scaled picture is read between its pixels. Nearest keeps hard pixels, and Linear Nice keeps edges next to transparency clean.Choices: Nearest, Linear Fast, Linear Nice |
| Formatadvanced | Enum | The pixel format of the output. Auto keeps the format of the input. |
The Resize operator gives a texture a new size in pixels. Use it to match a picture to a screen or to another texture, or to make a chain cheaper: blurring a small texture and scaling the result up costs far less than working at full size.
In None mode, the picture keeps its own pixel size, cut off or with empty space around it. In Fit mode, it is as large as possible while all of it shows, leaving empty bands at two sides like a letterboxed film. In Fill mode, it covers the whole frame and what does not fit is cut off. In Stretch mode, it is distorted to fill the frame exactly. Empty areas are transparent.
Keywords: scale, resolution, fit, fill, stretch, letterbox, crop, aspect ratio, downscale, upscale, pixel art, nearest