Is there a alpha multiplication mode for Clip Children?

Godot Version

v4.2.1.stable.official [b09f793f5]

Question

In 2D, when using a mask texture on sprite to clip its children, the alpha of the mask texture is treated as either 0 or 1.

I use a white circle with radial alpha drop as mask texture. I want the children also have similar alpha map as the mask.


P02

So, what I want is a alpha multiplication blend mode in Clip Children. Is such a mode available? Or is there a workaround?

Could you set the Target’s material to blend mode multiply?

Thanks for the advice.

The blend mode multiply affects all the channels: R, G, B and A. So my Target gets black when further away from the mask, instead of getting transparent.

So far, I have tried:

  1. Using a shader on Target to read screen texture to get alpha value of the mask. But the screen texture always has alpha 1.0;

  2. Use a shader on Target with render_mode blend_mul;. Results the same as your advice: affects all channels instead of alpha only;