Commit a50076a
committed
Improve performance of shader lighting code in Forward renderers.
- Skip sampling shadows if attenuation is very small.
- Skip computing diffuse and specular light if attenuation and shadow are very small.1 parent 23100e0 commit a50076a
3 files changed
Lines changed: 211 additions & 269 deletions
File tree
- servers/rendering/renderer_rd/shaders
- forward_clustered
- forward_mobile
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2369 | 2369 | | |
2370 | 2370 | | |
2371 | 2371 | | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
| 2372 | + | |
2377 | 2373 | | |
2378 | 2374 | | |
2379 | 2375 | | |
| |||
2441 | 2437 | | |
2442 | 2438 | | |
2443 | 2439 | | |
2444 | | - | |
2445 | | - | |
2446 | | - | |
2447 | | - | |
2448 | | - | |
| 2440 | + | |
2449 | 2441 | | |
2450 | 2442 | | |
2451 | 2443 | | |
| |||
Lines changed: 2 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1622 | 1622 | | |
1623 | 1623 | | |
1624 | 1624 | | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
1628 | | - | |
1629 | | - | |
1630 | | - | |
1631 | | - | |
| 1625 | + | |
1632 | 1626 | | |
1633 | 1627 | | |
1634 | 1628 | | |
| |||
1656 | 1650 | | |
1657 | 1651 | | |
1658 | 1652 | | |
1659 | | - | |
1660 | | - | |
1661 | | - | |
1662 | | - | |
1663 | | - | |
1664 | | - | |
| 1653 | + | |
1665 | 1654 | | |
1666 | 1655 | | |
1667 | 1656 | | |
| |||
0 commit comments