1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Use the original canvas to calculate light positioning

This commit is contained in:
Alon Ran
2023-02-17 05:11:24 +02:00
parent 6061d1bfd8
commit 2d7db30f0d
3 changed files with 3 additions and 5 deletions

View File

@@ -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) {