From a36a7c96acde95ef5923dc94b5f0b463df7ca84b Mon Sep 17 00:00:00 2001
From: Erik Hofman <erik@ehofman.com>
Date: Thu, 23 Dec 2021 14:50:26 +0100
Subject: [PATCH] Make a distinction between ocean and non-ocean, for which a
 flag was already available, when animating moving ice-texures.

---
 Shaders/water-ALS-high.frag | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Shaders/water-ALS-high.frag b/Shaders/water-ALS-high.frag
index c126b3446..38df4dd12 100644
--- a/Shaders/water-ALS-high.frag
+++ b/Shaders/water-ALS-high.frag
@@ -563,7 +563,10 @@ void main(void)
 
 
 	// add ice
-        vec4 ice_texel = texture2D(ice_texture, gl_TexCoord[0].st);
+        vec2 ice_tex_pos;
+        if (ocean_flag == 0) ice_tex_pos = gl_TexCoord[0].st;
+        else ice_tex_pos = vec2(waterTex2) * 0.2;
+        vec4 ice_texel = texture2D(ice_texture, ice_tex_pos);
 
 	float nSum =  0.5 * (noise_250m +  noise_50m);
 	float mix_factor = smoothstep(1.0 - ice_cover, 1.04-ice_cover, nSum);