If there is a group of sprites to be cut off, how to do it?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By zhagsenkk

I can cut off a sprite or a texture by shader, but if there is a group of sprites to be cut off, how to do it?

ps: Easy and flexible way to make sprite masks · Issue #23763 · godotengine/godot · GitHub

:bust_in_silhouette: Reply From: MysteryGM

Use a 2D editor like Gimp that supports alpha and save the images as PNG files.

Edit:
Looking at your other post you want a alpha mask shader. To do this what you need is a shader that just mixes between the image alpha and the alpha of the sprite.

When you say “group of sprites” can you give an example of what you are trying to do?

Thx first. “group of sprites” means that “the sprite” is combined by several Sprite.
Structure in godot will be(project “SpriteMask.zip” come from github link above ):

Main
----TextureRect
--------child1
--------child2
--------child3
--------child4
----HSlider

the child1,2,3,4 is Sprite. And I want these to be cut off along with TextureRect.
The shader only effects the TextureRect.

zhagsenkk | 2018-11-21 12:41

any answer?any ways?

zhagsenkk | 2018-11-22 11:31