0 votes

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: https://github.com/godotengine/godot/issues/23763

in Engine by (26 points)

1 Answer

0 votes

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

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?

by (1,492 points)

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 ):


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

any answer?any ways?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.