Are Semi-Transparent Masks Possible?

Hi everyone, I am working on a title screen for an upcoming game.

I am finding the new Unity UI tools fantastic, but one thing I noticed is that when using masks, unlike photoshop, pixels from the mask are either determined to be transparent or solid, there cannot seem to be any semi-transparency. This is causing the edges of the mask to look very pixelated. This would be fine for a pixel art game, but this particular style is very smooth shapes.

I’ve attached a screenshot showing the issue. The left side of the image shows how it looks in Unity, the right side is how the mockup looks in Photoshop.

Is this something we will need to create a shader to achieve?

I made a UI menu from a 2048^2 snow texture recently opaque by importing it into GIMP → Ctl-L → 80% (0% would be 100% translucent) and then saved.

And it looks good until it’s imported into Unity and then it looks poor. And you more it’s scaled the worse it looks. Even when I import an icon I’ve scaled outside Unity to the correct size it will still look poor.

That didn’t used to be the case that I remember. I think maybe Unity has decided to drop licensing a 3rd party image processing solution and write their own image processing library and the results up to now seem to be lacking (but I don’t know that I just know that recently in the 4.6.x series of releases, icons - including icons Unity itself uses in it’s editor gui have become overly blurred to hide pixilation or pixelated.

Hey there,

This is just because of how a stencil buffer works. It uses a bits to check if a texture should be shown or not. As you know a bit can be 0 or 1 and nothing in between.

If you want your image to have gradient transparency you will have to write your own shader but you can’t use the stencil buffer for this (which allows you to effect all other images being drawn).

Regards,