How to get caustics only show underwater?

I am trying to get a nice caustic effect. Right now I am using an extra directional light with a animated cookie script. Also using a underwater script which enables the caustic light along with a few other effects when I go below a certain value. This works and looks nice but still there are no caustics above the water but magically appears as soon as I am underwater.

My question is if there is anyway to get the caustics to always be enabled but only show under the water. I know it is possible but I am not sure how. I am using the terrain system so having two separate meshes above and below the water will not work.

Any help will be greatly appreciated. Thanks

Try using an orthogonal projector instead of directional light. With some additive shader it will create light like effect, however it with lack of shadows. Or at least i don’t know about projector having the shadowmap feature supported by the unity, however it could be scripted. So just create an ortho projector facing down and spreading over the water surface. The default unity additive projector shader doesn’t clip correctly what’s behind, so here’s what I am using:

Shader "Projector/Additive"
{
	Properties
	{
		_Decal ("Decal", 2D) = "white" { TexGen ObjectLinear   }
		_Color ("Color", Color) = (0.5, 0.5, 0.5, 1)
	}
	
	Subshader
	{
		Pass
		{
			ZWrite On
			Fog { Color (1, 1, 1) }
			Offset -1, -1
			Blend One One
			Cull Back
			 
			Tags { "RenderType"="Geometry-10" }
			
			CGPROGRAM
			#include "UnityCG.cginc"
			#pragma vertex vert
			#pragma fragment frag
	
			sampler2D _Decal;
			float4x4 _Projector;
			float4x4 _ProjectorClip;
			float4 _Color;
	
			struct vin
			{
				float4  pos 	: 	POSITION;
				float4  uv		: 	TEXCOORD0;
			};
			
			struct v2f
			{
				float4 vertex	: SV_POSITION;
				float4 uv		: TEXCOORD0;
				float4 pclip	: TEXCOORD1;
			};
	
			
			v2f vert (vin i)
			{
				v2f o;
				o.vertex 	= mul(UNITY_MATRIX_MVP, i.pos);
				o.uv 		= mul(_Projector, i.pos);
				o.pclip 	= mul(_ProjectorClip, i.pos);
				return o;
			}
	
			float4 frag(v2f i) : COLOR
			{
				clip(1-i.pclip.z);
				clip(i.pclip.z);
				clip(i.uv.x);
				clip(1-i.uv.x);
				clip(i.uv.y);
				clip(1-i.uv.y);
				float4 col = tex2Dproj(_Decal, i.uv) * _Color;
				return col;
			}

			ENDCG
		}

	}
}