How can I pass arguments to a Terrain shader at runtime?

I’m trying to map one of the Unity Pro water shaders to an object with a Terrain component, but the water script seems to require a Renderer component so it can directly access the assigned material to pass parameters to the water shader. Does anyone know of a way to do this with Terrain components?

I believe the textures used in terrain components are held in the TerrainData.detailPrototypes and TerrainData.splatPrototypes… I don’t see a way to get from them to the renderers though, just the materials.