- Home /
Transparent & self illumin object?
How can this texture be self illumin but transparent at the same time? I want it to be the texture of a spawner, but it gets affected by the lght if it is transparent, and if it is "self illumin" and not transparent, it doesn't have the transparency in the middle! Please help!
http://forum.unity3d.com/threads/79896-Transparent-and-Self-Illu$$anonymous$$ated-Shader
Check this out. I think this might work.
Answer by alexfeature · Dec 28, 2012 at 12:21 PM
Hey,
Black is used to mark transparent pixels and white to mark solid pixels in transparent shaders.
As per documentation (http://docs.unity3d.com/Documentation/Components/shader-SelfIllumFamily.html) the normal map is used for self illum so you cant have both at the same time since white (solid in the realm of transparency) is used as the self illum color.
So the correct way to do this would probably be to key the transparent areas Magenta or something and then make sure that the self illum shader treats Magenta pixels as transparent.
Of course this will require a custom self illum shader.
EDIT : http://forum.unity3d.com/threads/79896-Transparent-and-Self-Illuminated-Shader
Hope this helps, Alex