- Home /
Alpha Texture with white pixels turns out black
I'm having a few issues creating a grid visual for a level editor inside the game. One of it is that I have an alpha texture with white colored pixels, but in the game, it eventually turns out black.
(To visualize my problems, I had to use a few external image links, as I could only attach 2 images otherwise.)
The grid itself is just a plane which gets the following texture applied:
While it still looks good in the texture inspector, it already looks buggy in the material inspector. It doesn't look fully transparent anymore, as if a blueish tint was added to it through lighting, and the bottom of the cube is somehow yellowish:
Even worse, when seeing the plane in the editor, it turned into a darkening texture looking like it contains black color: http://ray.syroot.com/unity/alphatexture/p3.png
That's absolutely not what I want. In the end, it should look like this (screenshot from the old version of my game on my engine); note that the background clear color is black (if it would be blue, the grid would still be white): http://ray.syroot.com/unity/alphatexture/p4.png
My first guesses were that Unity applied some kind of lighting to the grid. But I already excluded the object from the only ambient light with a cull mask, putting it into its own layer.
I'm a bit lost here. Did I already make an error in the material inspector, since it already looks bad there?
Answer by saschandroid · Jan 18, 2016 at 09:26 AM
Do you get the desired effect with the "Unlit/Transparent" shader?
Thanks, that's it! I quickly had some look into the shader manuals, and guess I tweak this shader to also disable culling and mix in a texture deter$$anonymous$$ing the alpha to get a nice circular fade out of the grid.
Your answer
![](https://koobas.hobune.stream/wayback/20220612060530im_/https://answers.unity.com/themes/thub/images/avi.jpg)