Orama-Interactive / Pixelorama

Unleash your creativity with Pixelorama, a powerful and accessible open-source pixel art multitool. Whether you want to create sprites, tiles, animations, or just express yourself in the language of pixel art, this software will realize your pixel-perfect dreams with a vast toolbox of features. Available on Windows, Linux, macOS and the Web!
https://orama-interactive.itch.io/pixelorama
MIT License
6.9k stars 378 forks source link

Implement support for group layer blending #1077

Closed OverloadedOrama closed 4 weeks ago

OverloadedOrama commented 1 month ago

Layers that belong to the same group are now being blended together into a single texture, which represents the entire group. Layers outside the group are not affecting the group's blended texture. This has several advantages:

image Recreating the HD Index Painting technique shown in the video I linked above. "Layer 1" is the black and white layer where we draw, "Layer 3" is the dithering pattern, and they are both being blended together by "Group 2", which contains a posterize and a gradient map layer effect.

https://github.com/user-attachments/assets/5c6324ea-221e-4d3e-ace7-6c1bfc5adb49

Group 3, containing a pixel and a 3D layer, is being used by Layer 2 which acts as a clipping mask.

Bugs fixed:

This PR effectively makes group layers actually affect the blending process, rather than having group layers simply be for organization purposes and do nothing. However, it might be a good idea to introduce a "pass through" blend mode that exists only for group layers, which would restore the previous behavior and make group layers have no effect on the blending process.

EDIT: Done

OverloadedOrama commented 4 weeks ago

Should be good to get merged, I didn't find any issues on my testing. Performance could use some work in the future though.