-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mad Max: Fix bloom/lens flare opacity being calculated from wrong spo…
…t on depth buffer Calculating the opacity from the wrong spot on the depth buffer leads to the bloom & lens flare appearing & disappearing when they should not, being too pronounced, or not visible at all when it should be. The pixel shader has the depth of the light source in Z buffer scale, which we can use to correct this. Scale it out to world Z and use it to offset the location of the depth buffer read to determine the opacity of the bloom & lens flare. Debugging is included to show where the depth buffer is being sampled.
- Loading branch information
1 parent
f2d5a89
commit a0f71fc
Showing
2 changed files
with
85 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters