summaryrefslogtreecommitdiffstats
path: root/servers/rendering/renderer_viewport.cpp
diff options
context:
space:
mode:
authorAlon Ran <newdefectus@gmail.com>2023-02-17 05:11:24 +0200
committerAlon Ran <newdefectus@gmail.com>2023-02-21 11:57:16 +0200
commit2d7db30f0d883f038d3735011f492b03852c94c9 (patch)
tree424bdeadf4f15dccbc6b505eaa643c1ad9bd0181 /servers/rendering/renderer_viewport.cpp
parent6061d1bfd83262ef2faa3287ace5df588b34e1df (diff)
downloadredot-engine-2d7db30f0d883f038d3735011f492b03852c94c9.tar.gz
Use the original canvas to calculate light positioning
Diffstat (limited to 'servers/rendering/renderer_viewport.cpp')
-rw-r--r--servers/rendering/renderer_viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp
index 0e2a3c682d..f609fa6023 100644
--- a/servers/rendering/renderer_viewport.cpp
+++ b/servers/rendering/renderer_viewport.cpp
@@ -349,7 +349,7 @@ void RendererViewport::_draw_viewport(Viewport *p_viewport) {
Transform2D scale;
scale.scale(cl->rect_cache.size);
scale.columns[2] = cl->rect_cache.position;
- cl->light_shader_xform = cl->xform * scale;
+ cl->light_shader_xform = xf * cl->xform * scale;
if (cl->use_shadow) {
cl->shadows_next_ptr = lights_with_shadow;
if (lights_with_shadow == nullptr) {