1
0
Fork 0

Prevent water ice-textures from moving around.

This commit is contained in:
Erik Hofman 2021-12-23 14:22:48 +01:00
parent 0ef38014ad
commit b43a04895c
2 changed files with 2 additions and 1 deletions

View file

@ -563,7 +563,7 @@ void main(void)
// add ice // add ice
vec4 ice_texel = texture2D(ice_texture, vec2(waterTex2) * 0.2 ); vec4 ice_texel = texture2D(ice_texture, gl_TexCoord[0].st);
float nSum = 0.5 * (noise_250m + noise_50m); float nSum = 0.5 * (noise_250m + noise_50m);
float mix_factor = smoothstep(1.0 - ice_cover, 1.04-ice_cover, nSum); float mix_factor = smoothstep(1.0 - ice_cover, 1.04-ice_cover, nSum);

View file

@ -87,6 +87,7 @@ void main(void)
mat4 RotationMatrix; mat4 RotationMatrix;
gl_TexCoord[0] = gl_MultiTexCoord0;
vec3 shadedFogColor = vec3(0.55, 0.67, 0.88); vec3 shadedFogColor = vec3(0.55, 0.67, 0.88);
rawPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz; rawPos = (osg_ViewMatrixInverse *gl_ModelViewMatrix * gl_Vertex).xyz;