Properly get proxy texture size for canvas light, fixes #17067

This commit is contained in:
Juan Linietsky
2019-01-27 16:57:05 -03:00
parent 953cd03ea6
commit 0c60d4c682
7 changed files with 28 additions and 1 deletions

View File

@ -97,7 +97,7 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
RasterizerCanvas::Light *cl = F->get();
if (cl->enabled && cl->texture.is_valid()) {
//not super efficient..
Size2 tsize(VSG::storage->texture_get_width(cl->texture), VSG::storage->texture_get_height(cl->texture));
Size2 tsize = VSG::storage->texture_size_with_proxy(cl->texture);
tsize *= cl->scale;
Vector2 offset = tsize / 2.0;