(lights, objs)
| 589 | |
| 590 | |
| 591 | def render_shadow(lights, objs) -> tuple: |
| 592 | # CodeUndone VsCode |
| 593 | light:Light |
| 594 | obj:Object |
| 595 | for light in lights: |
| 596 | if not light.shadow: |
| 597 | continue |
| 598 | if light.type == 1: |
| 599 | _, _, light.shadow_map1 = render(objs, [], |
| 600 | Camera(x=light.x, y=light.y, z=light.z, |
| 601 | yaw=0, pitch=0, |
| 602 | width=light.shadow_properties[0], |
| 603 | height=light.shadow_properties[0], |
| 604 | z_near=light.shadow_properties[1], |
| 605 | z_far=light.shadow_properties[2], |
| 606 | fov=90, mode=5, light=light)) |
| 607 | _, _, light.shadow_map2 = render(objs, [], |
| 608 | Camera(x=light.x, y=light.y, z=light.z, |
| 609 | yaw=90, pitch=0, |
| 610 | width=light.shadow_properties[0], |
| 611 | height=light.shadow_properties[0], |
| 612 | z_near=light.shadow_properties[1], |
| 613 | z_far=light.shadow_properties[2], |
| 614 | fov=90, mode=5, light=light)) |
| 615 | _, _, light.shadow_map3 = render(objs, [], |
| 616 | Camera(x=light.x, y=light.y, z=light.z, |
| 617 | yaw=180, pitch=0, |
| 618 | width=light.shadow_properties[0], |
| 619 | height=light.shadow_properties[0], |
| 620 | z_near=light.shadow_properties[1], |
| 621 | z_far=light.shadow_properties[2], |
| 622 | fov=90, mode=5, light=light)) |
| 623 | _, _, light.shadow_map4 = render(objs, [], |
| 624 | Camera(x=light.x, y=light.y, z=light.z, |
| 625 | yaw=270, pitch=0, |
| 626 | width=light.shadow_properties[0], |
| 627 | height=light.shadow_properties[0], |
| 628 | z_near=light.shadow_properties[1], |
| 629 | z_far=light.shadow_properties[2], |
| 630 | fov=90, mode=5, light=light)) |
| 631 | _, _, light.shadow_map5 = render(objs, [], |
| 632 | Camera(x=light.x, y=light.y, z=light.z, |
| 633 | yaw=90, pitch=90, |
| 634 | width=light.shadow_properties[0], |
| 635 | height=light.shadow_properties[0], |
| 636 | z_near=light.shadow_properties[1], |
| 637 | z_far=light.shadow_properties[2], |
| 638 | fov=90, mode=5, light=light)) |
| 639 | _, _, light.shadow_map6 = render(objs, [], |
| 640 | Camera(x=light.x, y=light.y, z=light.z, |
| 641 | yaw=90, pitch=-90, |
| 642 | width=light.shadow_properties[0], |
| 643 | height=light.shadow_properties[0], |
| 644 | z_near=light.shadow_properties[1], |
| 645 | z_far=light.shadow_properties[2], |
| 646 | fov=90, mode=5, light=light)) |
| 647 | |
| 648 | elif light.type == 0: |
no test coverage detected