GarageGames/Torque3D — pull request #712 by lukaspj (2014-07-01 16:27:08+00:00)
Title: New terrain texture blending

New terrain texture blending! As described [here](http://www.garagegames.com/community/blogs/view/22762/1#comment_form).

There is this thing called "blendDepth" that allows you to tweak how sharp the blending it is, to show you the effect of tweaking this depth I created the following album:
[http://imgur.com/a/oae0O](http://imgur.com/a/oae0O)

First image is stock T3D blending, from there it is new blending with blendDepth 0.1,0.2 etc up to 0.9. Last image is blendDepth 0.99

You can set the "blendDepth" on the terrain material like this:
```
new TerrainMaterial()
{
diffuseMap = "art/terrains/Example/sand";
diffuseSize = "500";
detailMap = "art/terrains/Example/sand_d";
detailSize = "2";
detailDistance = "50";
internalName = "sand2";
normalMap = "art/terrains/Example/sand_n";
blendDepth = 0.5; // <---
};
```

You enable the new blending method by setting `$terrain::lerpBlend = false;` (defaults to true). This PR does not contain any UI changes so the new features have to be activated through script. (UI might come in a later PR!)

**Note for the new blending to work properly, the textures HAVE to have a normal map with a heightmap in the alpha channel. If you don't use normal maps, then this texture blending method is not for you.**