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.
According to https://en.wikipedia.org/wiki/Blend_modes#Dodge_and_burn
As was written, with an equality, blending with values > 1 produces strange results:
Base:
Blend:
Which is a procedurally generated sun that has many
r
andg
values > 1.Result (with
opacity = 0.5
):Replacing the conditional in line 2 with:
blend>=1.0
:Which is kinda cool, but still probably not what is wanted, as the color should saturate at white and
opacity = 0.5
here means that at most a 50% grey should be added from the blended image. Finally with line 2 reading(blend>1.0)?1.0:
... :Which is how I believe the blending would work in photo editing software.