You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot can downscale textures perfectly fine, but when you change the window's size while using keep in the window stretch settings, everything gets pixelated. Most likely this is because Godot uses something like nearest neighbour to downscale the window's contents, instead of something like bicubic scaling.
Describe the problem or limitation you are having in your project
Both of my current projects are mainly UI based and it's really bugging me how they look janky when they're windowed
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I'd like to ask for a way to change this downscaling from whatever Godot is currently using, to bicubic for example.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I don't think this needs any further explanation.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Possibly, if someone were to not use keep and viewport in the window stretch options and instead scale stuff according to the window's size using a camera or something, but I feel like it should be a default option.
Is there a reason why this should be core and not an add-on in the asset library?
People shouldn't have to look for a feature that can be so essential for making your UI look nice.
The text was updated successfully, but these errors were encountered:
That said, I don't think you actually need this feature to resolve this issue in your project. It's a matter of using the project settings that best match your use case.
If you use the 2d stretch mode, Godot will upscale/downscale 2D elements but will render them at a resolution matching the window size. Textures will be scaled with bilinear filtering if filtering is enabled on them (which is the default), or nearest-neighbor filtering if filtering is disabled on them.
In contrast, if you use the viewport stretch mode and resize the window to a resolution lower than the base resolution configured in the project settings, Godot will render at a higher resolution than actually needed. This generally wastes CPU/GPU resources in most situations, which is a bad idea for non-game applications (think of laptops' battery life).
To summarize, do not use the viewport stretch mode for non-game applications. The viewport stretch mode is primarily intended to be used for games with a pixel art aesthetic. In fact, for non-game applications, 2d isn't ideal either as it applies an automatically determined scale factor (in relation to the default window size). For applications, you probably want to use the disabled stretch mode to get more control over the scale factor.
You may also want to reconsider the use of the keep stretch mode for a non-game application (since it disables support for multiple aspect ratios), but that's a subject for another day 🙂
Describe the project you are working on
Godot can downscale textures perfectly fine, but when you change the window's size while using keep in the window stretch settings, everything gets pixelated. Most likely this is because Godot uses something like nearest neighbour to downscale the window's contents, instead of something like bicubic scaling.
Describe the problem or limitation you are having in your project
Both of my current projects are mainly UI based and it's really bugging me how they look janky when they're windowed
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I'd like to ask for a way to change this downscaling from whatever Godot is currently using, to bicubic for example.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I don't think this needs any further explanation.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Possibly, if someone were to not use keep and viewport in the window stretch options and instead scale stuff according to the window's size using a camera or something, but I feel like it should be a default option.
Is there a reason why this should be core and not an add-on in the asset library?
People shouldn't have to look for a feature that can be so essential for making your UI look nice.
The text was updated successfully, but these errors were encountered: