summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.cpp2
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp2
-rw-r--r--servers/rendering/rendering_server_canvas.cpp1
-rw-r--r--servers/rendering/rendering_server_canvas.h4
4 files changed, 6 insertions, 3 deletions
diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp
index beba709807..0e056691c7 100644
--- a/servers/physics_2d/collision_solver_2d_sw.cpp
+++ b/servers/physics_2d/collision_solver_2d_sw.cpp
@@ -47,7 +47,7 @@ bool CollisionSolver2DSW::solve_static_line(const Shape2DSW *p_shape_A, const Tr
Vector2 supports[2];
int support_count;
- p_shape_B->get_supports(p_transform_A.affine_inverse().basis_xform(-n).normalized(), supports, support_count);
+ p_shape_B->get_supports(p_transform_B.affine_inverse().basis_xform(-n).normalized(), supports, support_count);
bool found = false;
diff --git a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
index a13e7d786b..db2c707984 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
@@ -5871,7 +5871,7 @@ RID RasterizerStorageRD::decal_atlas_get_texture() const {
}
RID RasterizerStorageRD::decal_atlas_get_texture_srgb() const {
- return decal_atlas.texture;
+ return decal_atlas.texture_srgb;
}
void RasterizerStorageRD::_update_decal_atlas() {
diff --git a/servers/rendering/rendering_server_canvas.cpp b/servers/rendering/rendering_server_canvas.cpp
index 07eabfd430..b3d5b0ad83 100644
--- a/servers/rendering/rendering_server_canvas.cpp
+++ b/servers/rendering/rendering_server_canvas.cpp
@@ -81,6 +81,7 @@ void _collect_ysort_children(RenderingServerCanvas::Item *p_canvas_item, Transfo
child_items[i]->ysort_xform = p_transform;
child_items[i]->ysort_pos = p_transform.xform(child_items[i]->xform.elements[2]);
child_items[i]->material_owner = child_items[i]->use_parent_material ? p_material_owner : nullptr;
+ child_items[i]->ysort_index = r_index;
}
r_index++;
diff --git a/servers/rendering/rendering_server_canvas.h b/servers/rendering/rendering_server_canvas.h
index 59c0d1fa52..cebe32fba0 100644
--- a/servers/rendering/rendering_server_canvas.h
+++ b/servers/rendering/rendering_server_canvas.h
@@ -51,6 +51,7 @@ public:
Color ysort_modulate;
Transform2D ysort_xform;
Vector2 ysort_pos;
+ int ysort_index;
RS::CanvasItemTextureFilter texture_filter;
RS::CanvasItemTextureRepeat texture_repeat;
@@ -69,6 +70,7 @@ public:
ysort_children_count = -1;
ysort_xform = Transform2D();
ysort_pos = Vector2();
+ ysort_index = 0;
texture_filter = RS::CANVAS_ITEM_TEXTURE_FILTER_DEFAULT;
texture_repeat = RS::CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT;
}
@@ -83,7 +85,7 @@ public:
struct ItemPtrSort {
_FORCE_INLINE_ bool operator()(const Item *p_left, const Item *p_right) const {
if (Math::is_equal_approx(p_left->ysort_pos.y, p_right->ysort_pos.y)) {
- return p_left->ysort_pos.x < p_right->ysort_pos.x;
+ return p_left->ysort_index < p_right->ysort_index;
}
return p_left->ysort_pos.y < p_right->ysort_pos.y;