diff options
author | Anilforextra <anilforextra@gmail.com> | 2021-09-21 00:33:52 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2021-09-21 21:14:17 +0545 |
commit | 90908cd67d3f44ba70cc4b7b32f024ce508cc0ee (patch) | |
tree | 4c3f64aa550e6dc763b9776dded65560b67db2cc /servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp | |
parent | 87de2e7c4a38b1258d9a554c7f50cdbd8ac825fa (diff) |
Add Get Center Method for Rect2/Rect2i and AABB.
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp index 3c66fadbe9..f507a83072 100644 --- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp @@ -1621,7 +1621,7 @@ void RendererCanvasRenderRD::light_update_directional_shadow(RID p_rid, int p_sh Vector2 light_dir = p_light_xform.elements[1].normalized(); - Vector2 center = p_clip_rect.position + p_clip_rect.size * 0.5; + Vector2 center = p_clip_rect.get_center(); float to_edge_distance = ABS(light_dir.dot(p_clip_rect.get_support(light_dir)) - light_dir.dot(center)); |