Blendmode Multiply with filter make sprite black
See original GitHub issueExpected Behavior
Blendmode and effect should working together.
Current Behavior
Blendmode multiply make sprite black with blur effect, maybe with other effects too.
Steps to Reproduce
https://www.pixiplayground.com/#/edit/XIU2u6lFUP3iyrl3VEmRN
Environment
pixi.js
version: 6.0 and lower- Browser & Version: Chrome 87
- OS & Version: w10 Running Example
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Blendmode Multiply with filter make sprite black #7224
Blendmode and effect should working together. Current Behavior. Blendmode multiply make sprite black with blur effect, maybe with other effects ...
Read more >How to set an image/sprite to layer blend modes (Ex. ...
I essentially need to re-create the look of a multiply layer as seen in ... The shader needs just 1 edit to perform...
Read more >Using mask with blendmodel will result in black - Pixi.js
When I use mask and blendmode(MULTIPLY) alone, they are all right, but if they are used together, it will turn black.
Read more >The Multiply Blend Mode In Photoshop
The only exception is that any areas that are already pure black remain black, since obviously you can't make pure black any darker...
Read more >How to use CSS blend modes | Layout - Flywheel
This tutorial will cover CSS blend modes and how they are used. ... A blend mode for the red layer was selected, which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is working as intended, but I can see why this is confusing.
In general, for filters to work, Pixi does a “snapshot” of your display object to another surface then applies the filters to that. Because blend modes are a post-process, when you use multiply to your original container of sprites Pixi doesn’t know what to multiply the pixels to when it does the snapshot because blend modes take into account the pixels below the object. What you actually need to do is add the blend-mode to is the filter, which will apply it to the snapshot of the original source.
Now, this would work if you the bunnies weren’t on a transparent background because there’s some information about what to multiply. https://jsfiddle.net/bigtimebuddy/to5k9z0s/
In that case, we create an opaque background, add multiply to the bunnies, then blur. Everything is 👍
Sure, I’m going to close this seems like I answered your question.