- Home /
Mesh renderer transparent parts darker
Hi,
I'm quite new to Unity and is testing the Mesh Renderer to map different parts of a texture to the Mesh. The mapping seems to be working great, but not the transparency.
My problem is that the transparent parts of the texture (alpha channel) is darker = "not fully transparent". Ie the texture is shown as a transparent darker square with the actual visible graphics on top.
More details / what I have tested:
In the material I'm using the Standard shader and Transparent rendering mode, adding the texture to Albedo, setting the color to white. (There is also a slider just below the color selector which I've set to 0 since the texture is otherwise even darker)
I've verified that the transparent parts of the PNG-texture are fully transparent
I've tried disabling the (directional) light sources and only leave the ambient light in the scene. Still the transparent parts show up as a darker (partly transparent) square. So this does not seem to be a lighting issue?
Any input / suggestions appreciated.
Answer by ImpOfThePerverse · Oct 07, 2017 at 04:18 PM
If there are no gradients in the alpha channel you can use the cutout version of the standard shader and it will make transparent areas 100% invisible, but if you have some areas that are semi-transparent, you'll need a custom shader.
Thx, that eli$$anonymous$$ated the darkening of the transparent areas!
I currently do not have any semi-transparent areas, so it's enough for this case.
But for future use I would really like to know if the "Transparent" setting always adds a "darkening" of the transparent areas? (Or if it's something I'm doing wrong?)
The darkening is there because the transparent surface continues to show reflections and specular. The surface gets darker when the metallic setting is high - the surface darkens in response to the specular highlight beco$$anonymous$$g more intense. It looks right if the material is like glass, where you'd still be able to see reflections on the surface even if it's 100% transparent.
Great, Thx for the explanation! This helped me a lot.
Your answer
![](https://koobas.hobune.stream/wayback/20220612140504im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
glass sphere with reflective/specular shader? 2 Answers
How do you get ambient occlusion working with transparency and lightmapping? 0 Answers
Create a shader using mask for sprite 1 Answer
Import From Maya - Transparent Side 1 Answer
Fading objects to transparent - Apply shader with a script? 2 Answers