From 1224d7a25cfe3d165bd1f9ca298e536d2f5a3279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Roudi=C3=A8re?= Date: Mon, 1 Nov 2021 15:23:46 +0100 Subject: Implement texture padding in TileSetAtlasSources --- doc/classes/TileSetAtlasSource.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml index 881a1c3d07..6580c6bd4c 100644 --- a/doc/classes/TileSetAtlasSource.xml +++ b/doc/classes/TileSetAtlasSource.xml @@ -45,6 +45,21 @@ Returns the alternative ID a following call to [method create_alternative_tile] would return. + + + + If [member use_texture_padding] is [code]false[/code], returns [member texture]. Otherwise, returns and internal [ImageTexture] created that includes the padding. + + + + + + + + Returns the region of the tile at coordinates [code]atlas_coords[/code] for frame [code]frame[/code] inside the texture returned by [method get_runtime_texture]. + [b]Note:[/b] If [member use_texture_padding] is [code]false[/code], returns the same as [method get_tile_texture_region]. + + @@ -232,5 +247,9 @@ The base tile size in the texture (in pixel). This size must be bigger than the TileSet's [code]tile_size[/code] value. + + If [code]true[/code], generates an internal texture with an additional one pixel padding around each tile. Texture padding avoids a common artifact where lines appear between tiles. + Disabling this setting might lead a small performance improvement, as generating the internal texture requires both memory and processing time when the TileSetAtlasSource resource is modified. + -- cgit v1.2.3