From 7d6a25c91e6f4869a182a3f8fe387fadc0280314 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Thu, 15 Dec 2022 11:41:27 -0800 Subject: [PATCH] Use large offset for tilemap layer level canvas items This matches the logic in _rendering_update_dirty_quadrants --- scene/2d/tile_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 3ae7a0b34d0..e8fbdb4d6c5 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1092,7 +1092,7 @@ void TileMap::_rendering_update_layer(int p_layer) { /*Transform2D xform; xform.set_origin(Vector2(0, p_layer)); rs->canvas_item_set_transform(ci, xform);*/ - rs->canvas_item_set_draw_index(ci, p_layer); + rs->canvas_item_set_draw_index(ci, p_layer - (int64_t)0x80000000); layers[p_layer].canvas_item = ci; }