- Home /
Unlit/Transparent texture leaves dark lines on the transparent edges
I have transparent pngs on flat planes using the unlit/transparent shader and I get these lines that flicker on all the transparent edges (see screen shot). I looked this issue up on this forum and found some answers, 1: set the wrap to clamp which didnt work with the unlit transparent and I cant do on most of my objects anyway and 2: make sure there is a transparent edge around the entire png which also didnt work and I cant do on most my object again. I also tried making it a tiff with an alpha layer and that did nothing as well.
So I am wondering what I can do to solve this problem?
https://picasaweb.google.com/lh/photo/4QYnLYR79tVhoRWaI4OaVqcG-IodSRtMHoQ3uddR8xk?feat=directlink
Answer by kalvinlyle · Jan 13, 2012 at 02:46 AM
The pixels from the bottom of your texture are blurring and wrapping to the top. The shader won't matter, as the settings are for the textures and will transfer to all shaders your texture is used in.
I'm working on a 2D game at the moment and have had this issue on a few textures. Setting the Wrap Mode to Clamp will fix this, make sure you Apply the changes to the texture after you change them.
I'm assuming this is a 2D game where the camera is mostly fixed... if you change the Texture Type to Advanced and turn off Generate Mip Maps you can save some memory on your textures as well.
For other textures were the Wrap Mode can't be set to Clamp you'll need to leave a significant transparent border around all edges if your texture uses mip maps as the down sampling will blur the texture and it will bleed further as the camera zooms out or the glancing angle increases.
Thanks! That really helped, its good knowing what actually is happening to cause the issue. I was able to get the clamp setting to work eventually so that is good now, and for the ones that couldnt have that ins$$anonymous$$d of putting a transparent edge around the whole thing I was able to add it to the bottom and top only, I wont ever see the sides of these particular objects, so they didnt matter, and it worked.