Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

AtlasTexture

Inherits: Texture2D < Texture < Resource < RefCounted < Object

A texture that crops out part of another Texture2D.

Description

Texture2D resource that draws only part of its atlas texture, as defined by the region. An additional margin can also be set, which is useful for small adjustments.

Multiple AtlasTexture resources can be cropped from the same atlas. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls.

Note: AtlasTexture cannot be used in an AnimatedTexture, and may not tile properly in nodes such as TextureRect, when inside other AtlasTexture resources.

Properties

Texture2D

atlas

bool

filter_clip

false

Rect2

margin

Rect2(0, 0, 0, 0)

Rect2

region

Rect2(0, 0, 0, 0)

bool

resource_local_to_scene

false (overrides Resource)


Property Descriptions

Texture2D atlas

The texture that contains the atlas. Can be any type inheriting from Texture2D, including another AtlasTexture.


bool filter_clip = false

  • void set_filter_clip ( bool value )

  • bool has_filter_clip ( )

If true, the area outside of the regi