what you could do that would be less expensive as far as materials. it would use 2 material IDs. the upper parts that are intended to be solid sand will be a basic sand shader without the use of any nodes for opacity.. then the ends will use a 2nd material and have the transparency nodes plugged in, making them fade out.
The solution is go to the Translucency Category in the Material Editor properties section below and find the check box "Use Lit Translucency Depth Pass" and enable it. I also advise you of correcting your mask (I see you use a OneMinus node) to save one instruction as well as utilizing the alpha channel of the diffuse map…
Masked mode is either fully transparent or fully opaque, there is no blending. However, transparent mode should be able to achieve what you want. Double check to make sure your alpha map is at full value in the areas that should be 100% opaque. Edit: I'm wrong. I thought it was working on my end, but it's doing the same…