SpeedyVelcro / godot-scaled-texture-2d

Texture2D for Godot that always renders at the same size regardless of source texture size.
MIT License
1 stars 0 forks source link

ScaledTexture2D

ScaledTexture2D is a Resource for Godot Engine 4.2 that displays a texture at a fixed size.

Typically if you need a texture to show at a certain size, you would prefer to do the scaling somewhere else such as on a Sprite2D. This resource is for the edge case where you know the size you want to display the texture at, but you do not know the size of the texture itself. This situation may arise if you are trying to support user-made texture packs using resource pack loading. In such a case, users may want to create create high-resolution texture packs to support higher zoom levels in your game, or low-resolution texture packs to save memory.

Installation

Follow the instructions in the Godot Docs.

Usage

License

See LICENSE.md