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 /servers/visual | |
parent | 21939ce08b042b8cfcff16da780a4595aac500cd (diff) |
-fixed broken lighting in release version of godot for isometric light demo, fixes #1697
Diffstat (limited to 'servers/visual')
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 64ddc12513..6556f8bc42 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -7047,17 +7047,20 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_ for(Set<Rasterizer::CanvasLight*>::Element *F=E->get().canvas->lights.front();F;F=F->next()) { + Rasterizer::CanvasLight* cl=F->get(); if (cl->enabled && cl->texture.is_valid()) { //not super efficient.. Size2 tsize(rasterizer->texture_get_width(cl->texture),rasterizer->texture_get_height(cl->texture)); tsize*=cl->scale; + Vector2 offset=tsize/2.0; cl->rect_cache=Rect2(-offset+cl->texture_offset,tsize); cl->xform_cache=xf * cl->xform; if (clip_rect.intersects_transformed(cl->xform_cache,cl->rect_cache)) { + cl->filter_next_ptr=lights; lights=cl; cl->texture_cache=NULL; @@ -7067,6 +7070,7 @@ void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_ cl->light_shader_xform = (cl->xform_cache * scale).affine_inverse(); cl->light_shader_pos=cl->xform_cache[2]; if (cl->shadow_buffer.is_valid()) { + cl->shadows_next_ptr=lights_with_shadow; if (lights_with_shadow==NULL) { shadow_rect = cl->xform_cache.xform(cl->rect_cache); |