I'm not too familiar with the default engine shaders so changing and adapting them would probably mean more work than just writing a new normal mapping shader.
I suggest you simply take the normal mapping shader from the online shader tutorial and adapt it as follows:

1) In your vertex shader you will need to OUTput the y world position of the vertex, for instance make OutTex a float3 instead of float2 and write
OutTex.z = mul(inPos,matWorld).y;

2) Your pixel shader will now need to import float3 as inTex, too, then simply write the following line at the beginning of the pixel shader function:
clip(inTex.z-water_height_var);

3) Define var water_height = 123; in your script and write float water_height_var; at the beginning of your shader file.

4) Material events can be utilized as follows:

var mat_my_bump_switch_event()
{
if(render_view == camera) mtl = mat_my_bump;
else mtl = mat_my_bump_clip;
return 0;
}

MATERIAL* mat_my_bump = {...}
MATERIAL* mat_my_bump_clip = {nm shader with clip code}
MATERIAL* mat_my_bump_switch =
{
event = mat_my_bump_switch_event;
flags = ENABLE_RENDER;
}

Now apply the mat_my_bump_switch material to your entities which can penetrate the water surface.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends