How to use a stencil mask in Defold?

please help me with one example so I can understand about DEFOLD mask why it’s required and how to use it.
Thank you :))

Here is a handy guide for GUI masks:

2 Likes

I need something like I can run and check in my local environment.

Here’s an example: https://defold.com/examples/gui/stencil/ (note the GitHub download button)

2 Likes

thanks for the help

how to add masking to a particular sprite you have any examples please share them with me.

This sounds like it requires a custom shader, which accepts both the color texture, and a mask texture.

There are a few posts on here describing how to get started with shaders.

On my phone right now, so it is difficult to share exact links or write any code.

1 Like

Is this what you are looking for?

1 Like

yes, this is am looking for but without creating a different render and materials any other way is there an easy way so I can add 2d masking to sprite in defold engine.
Thanks for your response I checked all the conversation happens for 2d masking/clipping actually am looking for an easy way.

1 Like

please when are free share those link so it will help me for coding.
Thanks for response .

No, not without using another material and a modified render script

1 Like

ok, thanks for the information.

I have same issue but after studied everybody proposal presently I have appropriate arrangement related to my problem. thank a part everybody for your valuable back.

1 Like