Skip rendering of lights with zero size
This commit is contained in:
parent
6ec2caf12c
commit
9bf47923a5
1 changed files with 4 additions and 0 deletions
|
@ -131,6 +131,10 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
|
||||||
if (cl->enabled && cl->texture.is_valid()) {
|
if (cl->enabled && cl->texture.is_valid()) {
|
||||||
//not super efficient..
|
//not super efficient..
|
||||||
Size2 tsize = VSG::storage->texture_size_with_proxy(cl->texture);
|
Size2 tsize = VSG::storage->texture_size_with_proxy(cl->texture);
|
||||||
|
// Skip using lights with texture of 0 size
|
||||||
|
if (!tsize.x || !tsize.y) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
tsize *= cl->scale;
|
tsize *= cl->scale;
|
||||||
|
|
||||||
Vector2 offset = tsize / 2.0;
|
Vector2 offset = tsize / 2.0;
|
||||||
|
|
Loading…
Reference in a new issue