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.
Broken: https://www.pixiplayground.com/#/edit/wh4NJRXJqWCcI87N8lB03
Fixed: https://www.pixiplayground.com/#/edit/2LB0thwrX8EQM5iE7SXN~
Output in Flash runtime:
This is not the breaking change: in most of cases ADD was applied on opaque backdrop, and when people use it on transparent background they see the difference:
#5677
#5673
#5446
This is the final answer on BlendMode ADD problem.
Sometimes when I look many hours on the same line, when I know there's a bug but I dont see it. I knew about that effect and thanks to several people I deduced that something is wrong with my memory and sight.
Call it brain blind zone. Call it memory hash collision. Such things happen.
After blackboxing and making more tests with Adobe Flash, I finally found that brain glitch.
I do not know how the heck
gl.DST_ALPHA
appeared in one of coefficients. maybe it was before my time in pixijs. Somehow, at some point of time I changedADD
in my private fork to correct one[gl.ONE, gl.ONE]
, but I forgot to push it into vanilla pixijs!That's why I thought that pixijs vanilla ADD is correct, I even answered to multiple people that having completely transparent geometry add over half-transparent background actually changes the color. I recommended to use custom blendMode with
[gl.ONE, gl.ONE]
as workaround, completely forgetting that its actually the correct one from my private fork!Related PR: #5562
I thank @hsienwei, @SergiyTopalov , @distinctdan and others who drew my attention to the problem.