- Home /
White outline around tree leaves after upgrade to Unity 5
After upgrading our project from unity 4.6 to 5, I've noticed a white outline that surrounds each of the leaves in our trees if they are in front of any other objects in the scene:
If the leaf is in front of the tree trunk, you wont see this outline; however, if it's in front of the ground or sky (or anything else other than the tree) they you see this. If I drag the tree directly into the scene I don't see this issue, so it appears to be with the shader used for terrain trees causing the problem.
I'm using a PNG texture for the leaves.. Anyone know a workaround for this issue to make textures play nicely with these new tree leaf shaders?
I see this all the time with cut-out shaders. Looks like the alpha-cutoff value is adjusted too low (or the leaf was made with alpha too high, depending how you look at it.)
Not sure about the new nature shaders, but whenever I see that, I just adjust the cut-off slider. In fact, I always adjust the cut-off sliders, since what are the odds they happen to synch-up perfectly.
I too had the same thought with the alpha cut off slider; however, it seems to have no effect. Here's my texture import and material settings:
In an interesting twist.. If I switch the player settings to Forward rendering from deferred, the problem goes away.. Not that this is a solution, but it seems to point more to how that new shader is handled in the deferred renderer.
Looks like I'm not the only one hitting this issue:
http://forum.unity3d.com/threads/unity-5-something-weird-with-trees-alpha-textures.307372/
Answer by twobob · Mar 24, 2015 at 05:38 PM
For us it was turn off "Receive Shadows" on the prefab in p4. Obviously not ideal.
Perhaps though this has been picked up in the patches now/soon as it sound familiar. 5_0 (p series)