renderer: fix legacy dynamic light intensity #1143
Merged
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.
When I fixed the legacy dynamic light renderer in #1093, I noticed the dynamic light was too faint.
Since then I noticed the light was brighter with such renderer when legacy map overbright was enforced, meaning it was the overbright cancellation that was running where it should not.
This is now fixed.
Legacy dynamic light renderer with legacy overbright (reference):
Legacy dynamic light renderer with new overbright implementation:
For comparison, this is how it looks with the non-legacy tiled dynamic light renderer:
The light is believed to be different because the lighting algorithm is totally different to begin with.
The legacy light renderer not saturating to white is believed to be because the legacy dynamic light blends the dynamic light as a separate stage and the framebuffers are clamped to
1
, meaning1 * n
wheren
is next stage color is alwaysn
. We can't fix that easily, it's a legacy renderer anyway.