Hi!
I’m using Mask and RectMask2D and it works very well if the child images are using Material None.
But I need an Child Image with Additive Particle Effect, so I created a Material and used this Material on my Image.
But when using this Material, the Mask does not works anymore.
Is this expected? It seems I can only make masks to work when uning NONE as Material of Child Elements.
The masking is done in the shader so a particle shader wont work. You could write a custom shader by combing the UI masking into the particle shader. You can download the built in shaders from the download unity page.
Well… Here is the answer! A shader with Addivtce Blending and Masking Support!
Guys, how do we turn the default UI image shader into additive?
I presume it's UI-Default.shader and trying to do this by changing Blend to One One results in a console error - why? I tries soft additive "Blend OneMinusDstColor One" and stencil works but now the image set in the Image component doesn't appear, I get a rectangle instead.
The doc states that "All following properties are valid for both SrcFactor & DstFactor in the Blend command" but my guess is this is only true with Unity stuff…
2 Likes