Commit 638c5dd
authored
# Objective
- Fixes #23997 for `spotlight` (`rect_light` fixed with #24024 already)
- The spotlight example changes the transform of each spotlight, but the
`ExtractedView` and the `Frustum` for the spotlight never updates, hence
why the light doesn’t look complete for subsequent frames.
## Solution
- For Spot lights (and Point lights since those were also affected),
update the `ExtractedView` and the `Frustum` if its corresponding
`ExtractedPointLight` has changed.
- AFAIK this isn’t needed for Directional lights because
`ExtractedView`s aren’t re-used — they’re made anew in `prepare_lights`
## Testing
- `cargo run --example spotlight` works as desired.
- `cargo run --example async_channel_pattern` works as desired (for
PointLight testing)
- @Zeophlite assist with the example runner (was done before the frusta
change though)
1 parent dfb904c commit 638c5dd
2 files changed
Lines changed: 80 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1004 | 1004 | | |
1005 | 1005 | | |
1006 | 1006 | | |
1007 | | - | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1008 | 1014 | | |
1009 | 1015 | | |
1010 | 1016 | | |
1011 | 1017 | | |
1012 | 1018 | | |
1013 | 1019 | | |
1014 | 1020 | | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
1015 | 1029 | | |
1016 | 1030 | | |
1017 | 1031 | | |
| |||
1548 | 1562 | | |
1549 | 1563 | | |
1550 | 1564 | | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
1551 | 1600 | | |
1552 | 1601 | | |
1553 | 1602 | | |
| |||
1658 | 1707 | | |
1659 | 1708 | | |
1660 | 1709 | | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
1661 | 1739 | | |
1662 | 1740 | | |
1663 | 1741 | | |
| |||
0 commit comments