1
0
Fork 0

Make a distinction between ocean and non-ocean, for which a flag was already available, when animating moving ice-texures.

This commit is contained in:
Erik Hofman 2021-12-23 14:50:26 +01:00
parent b43a04895c
commit a36a7c96ac

View file

@ -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);