Skip to content

Simplify D3D9 fixed-function lighting#5720

Merged
doitsujin merged 4 commits into
masterfrom
light-stuff
Jun 19, 2026
Merged

Simplify D3D9 fixed-function lighting#5720
doitsujin merged 4 commits into
masterfrom
light-stuff

Conversation

@doitsujin

Copy link
Copy Markdown
Owner

There were multiple bugs here, one with tracking enabled lights which wasn't really working properly if the app set >8 lights, and one where state blocks wouldn't disable lights.

This fixes lighting issues in Sang-Froid: Tales of Werewolves.

Also cleans up the lighting-related shader code for good measure, because dear god that was hard to disect in renderdoc.

There was a bug somewhere in the state block code since it would
lose information about enabled and disabled lights somehow.
No reason to have two when the only thing one of them does is set the other.
Div-by-zero fix in constant folding.
@doitsujin doitsujin merged commit 5651a38 into master Jun 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant