Fix dynamic light blockiness and strength#1108
Merged
VReaperV merged 1 commit intoDaemonEngine:masterfrom Apr 30, 2024
Merged
Conversation
Sets a minimum radius for light culling to avoid blocky artifacts. Still sort of a hack, but it works better than what we had. Also made attenuation quadratic rather than linear for dynamic lights since that is more correct without broken gamma.
Contributor
|
This fixes the issues for me too!! |
DolceTriade
approved these changes
Apr 29, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sets a minimum radius for light culling to avoid blocky artifacts. Still sort of a hack, but it works better than what we had.
Also made attenuation quadratic rather than linear for dynamic lights since that is more correct without broken gamma (previous incorrect lighting was essentially doing distance ^ 4.2 due to gamma correction). In the same pr because without the correct attenuation the blockiness is still there.
Before and after for light culling:


I've chosen the 2.0 * 32.0 value for the minimum radius because it fixes the blockiness issues with the smallest scale lights that we have. Simply always increasing radius results in too many tiles getting the light source.
This also fixes the same issue with https://users.unvanquished.net/~modi/res-psaw_dev%2Bishq1.dpk, however it's more difficult to capture a screenshot of that.
Fixes #791.