- l.shadow_camera.set_object_matrix(*l.light->get_matrix());
- l.shadow_camera.set_position(target);
- // TODO support point and spot lights with a frustum projection.
- // Omnidirectional lights also need a cube shadow map.
- l.shadow_camera.set_orthographic(radius*2, radius*2);
- l.shadow_camera.set_depth_clip(-radius, radius);