Shaders and Advanced Terrain - some good news.
Ok, I've bumped this to the top of the list because people are trying to get shaders working with Advanced Terrain and other objects and might not be aware of the significance of some recent bug fixes (U6.3). (Well, I wasn't anyway.)
The new flag on the "load effect" command allows the terrain's stage 0 and stage 1 UV coordinates and texture data (the main and detail textures respectively) to be accessed directly within the shader. If you want to apply a flashlight texture, lightmap or some other texture that you want to blend with the stage 0 and 1 textures, then you can apply these to stage 2. The new flag would need to be set to one as in the following example:
load effect "Media/GGFlashlight v5.fx", 1, 0, 1
So the workaround I mentioned earlier is no longer needed. I'd like to thank Paul Johnson for explaining this to me.
The same flag allows you to specify your own normals via
set vertexdata normals - if you don't set it the shader will use recalculated normals whenever the shader uses tangents or binormals (don't ask me why) - unless your shader code calculates them itself of course.
So good news all round.