Terrain transparent texture

How do I can use transparent texture on my terrain in Unity5? This shader don’t work http://wiki.unity3d.com/index.php/TerrainTransparency

The standard shaders’ source code are all available for download here.

I recommend you open up the terrain one, and modify it to allow transparency, then import the modified shader into your project. The docs for writing shaders are pretty good.

I’ve just spent a few hours working this out, so here is my answer for anyone else who is stuck on this.

First of all, download the shader source code as described by @FortisVenaliter. You will get a zip file with lots of shaders in. Find Standard-FirstPass.shader and copy it to your Assets directory. This will replace one of the built in terrain shaders, but nothing will change at the moment because it’s still the same as it always was.

Now open the file in an editor. Search for the SplatmapMix line. After it, add a line reading:
if(splat_control.r > 0.05) discard;

This means that any pixels which would normally be rendered with the first texture are now thrown away. You should therefore use some dummy texture as your first one, then put your real terrain textures after that. It follows that when you create a new terrain, it will initially be entirely transparent, so it may appear not to have worked. Just paint something on the terrain and you should see it working.