No Overlapping Transparency

I don’t know exactly how to describe this in the title but I have two 2D UI images and they’re both slightly
transparent.

I want to keep them separate objects so that I can animate them but when they overlap with each other, I want to overlapped parts to remain the same transparency instead of getting darker.

Does anyone know a good way I can accomplish this? Both of the images are simple single color shapes so something like blocking the overlapped part from drawing for one of the images would work but I’m not sure how to do that. Thanks.

Hi @vegasanx ,

For sure you can accomplish what you want, but unfortunately, depending on your particular needs probably would not be so easy.

What you can do is to use a different (from the one that you’re currently using) shader on your objects.

You can find more information about changing the shader here: Unity - Manual: Materials

My recommendation is to try using one that is already made, maybe you can check the ones that are created for rendering particles: Unity - Manual: Standard Particle Shaders

If you can’t find any that fit your needs, you’ll have to code your own shader. You can find more information about it here: Unity - Manual: Shaders core concepts

If you want, you can use a visual tool package named Shader Graph for creating shaders, that was recently added to Unity: How Shader Graph can be applied to your 2D or 3D game | Unity

Good luck with it!

1 Like

Ok thanks

1 Like

My pleasure!

1 Like