diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-04-30 11:34:24 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-04-30 11:34:24 -0300 |
commit | 5c6b31c024b60ae9c43dc48c04128de99d147f5a (patch) | |
tree | a08bb439dc474664cc32370f5553f1ac7a68abc4 /drivers/gles2 | |
parent | 21939ce08b042b8cfcff16da780a4595aac500cd (diff) |
-fixed broken lighting in release version of godot for isometric light demo, fixes #1697
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 585d512abb..feff49c1de 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -9452,6 +9452,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const while(light) { + if (ci->light_mask&light->item_mask && p_z>=light->z_min && p_z<=light->z_max && ci->global_rect_cache.intersects_transformed(light->xform_cache,light->rect_cache)) { //intersects this light @@ -9489,6 +9490,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const } + bool has_shadow = light->shadow_buffer.is_valid() && ci->light_mask&light->item_shadow_mask; canvas_shader.set_conditional(CanvasShaderGLES2::USE_SHADOWS,has_shadow); |