Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kfitfk
Copy link

@kfitfk kfitfk commented Sep 11, 2024

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