summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-01 10:45:24 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-01 10:45:24 -0300
commit7879efc50b46fc06cb451e6c6758245b289d7d22 (patch)
tree6b8d15ce90c65ad4f43d70462a0a1241e2cd0668 /servers/visual
parentb78c1e52c2e5bf688760e8102344b1a65f9c3851 (diff)
Make both lights and occluders stop working if hidden, fixes #2437
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/visual_server_raster.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 79911121f5..3be272461d 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -7182,6 +7182,8 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_
for(Set<Rasterizer::CanvasLightOccluderInstance*>::Element *F=E->get().canvas->occluders.front();F;F=F->next()) {
+ if (!F->get()->enabled)
+ continue;
F->get()->xform_cache = xf * F->get()->xform;
if (shadow_rect.intersects_transformed(F->get()->xform_cache,F->get()->aabb_cache)) {