Commit 210e362
authored
Fix vehicle headlights not lighting other vehicles (multitheftauto#5074)
#### Summary
Move the vehicle specular light from direct3d slot 1 to slot 7.
Slot 1 is also used for the first temporary directional light, so the
vehicle pipeline was overwriting the incoming headlights before render
the vehicle. Slot 7 is also added in common `LIGHT*` shader parameters
to not break custom shaders.
#### Motivation
Fixes multitheftauto#4636.
#### Test plan
I reproduced the same scenario as in the issue video. The video below
shows the result after the fix.
https://github.com/user-attachments/assets/01866dac-b1d3-43ee-b65c-5122e9c7f15b
#### Checklist
* [x] Your code should follow the [coding
guidelines](https://wiki.multitheftauto.com/index.php?title=Coding_guidelines).
* [x] Smaller pull requests are easier to review. If your pull request
is beefy, your pull request should be reviewable commit-by-commit.
Co-authored-by: Dryxio <215281400+Dryxio@users.noreply.github.com>1 parent 6900903 commit 210e362
2 files changed
Lines changed: 16 additions & 3 deletions
File tree
- Client
- core/Graphics
- multiplayer_sa
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
583 | 587 | | |
584 | 588 | | |
585 | | - | |
| 589 | + | |
586 | 590 | | |
587 | 591 | | |
588 | | - | |
| 592 | + | |
589 | 593 | | |
590 | 594 | | |
591 | 595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
939 | 948 | | |
940 | 949 | | |
941 | 950 | | |
| |||
0 commit comments