Skip to content

swap blend and base params to match effects in Photoshop#38

Open
kfitfk wants to merge 1 commit into
pixijs-userland:masterfrom
kfitfk:master
Open

swap blend and base params to match effects in Photoshop#38
kfitfk wants to merge 1 commit into
pixijs-userland:masterfrom
kfitfk:master

Conversation

@kfitfk

@kfitfk kfitfk commented Sep 11, 2024

Copy link
Copy Markdown

When testing out the blend modes, I noticed that "Color Burn", "Color Dodge", "Soft Light", and "Hard Light" effects using pixi/picture are different from effects in Photoshop.

I've made a simple demo. The image on the left is rendered using pixi/picture, the image on the right is exported from Photoshop.
pixi_ps_compare

Here's the demo code and psd file.
demo_code_and_psd.zip

For most of the blend modes, I swapped the blend and base parameters.

As with hard light, it is the same as overlay except that they expect layers in reverse order from each other. Since the 3rd parameter of mix function for overlay is step(base, 0.5), the corresponding param for hard light should be 1.0 - step(base, 0.5), not 1.0 - step(blend, 0.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant