 	vec3 normalFromHeightMap = cross(heightU - height, heightL - height);
 
 	vec3 normal = normalize(normalFromHeightMap);
-//	vec3 normal = normalize(vfNormal);
 
 	vec3 rayDir = refract(camDir, normal, airToWater);
 	vec3 bottom = rayDir * waterDepth / rayDir.z;

	return vec3(position, FetchWaterTex(position).x);
}

void main_() {
	fragColor = vec4(1, 1, 0, 1);
}

	float mask = dot(normal, vec3(0, 0, 1));
	vec4 color = vec4(1, 1, 1, 1.0 - mask);

	float dist1 = length(position + vec2(0.5, 0.5));
	float dist2 = length(position - vec2(0.5, 0.5));

	vec2 coord = texcoord;

	vec3 c1 = texture(sampler0, coord).xyz;
	vec3 c2 = texture(sampler1, coord).xyz;
	vec3 c3 = texture(sampler2, coord).xyz;
	float delaymap = texture(sampler4, texcoord).x;
	vec4 timeline = texture(sampler3, vec2((wrappedTime - delaymap) / loopTime, 0));
	vec3 bg = c1 * timeline.x + c2 * timeline.y + c3 * timeline.z;
//	vec3 bg = normal;


	vec3 normalForSample = normal;
	vec3 skyColor = texture(sampler5, normalForSample.xy * vec2(0.5, -0.5) + vec2(0.5, 0.5)).xyz;

	float sunStr = GetFakeSunIllum(position.xy, normal);

	fragColor.w = 1.0;
	fragColor.xyz = mix(bg, skyColor * 1.5 + color.xyz, color.w) + sunStr;



//	fragColor.xyz = height.zzz;
//	fragColor.xyz = 0.5 + normalFromHeightMap;

