Skip to content
Snippets Groups Projects
Commit bb69921d authored by Noé's avatar Noé
Browse files

Fixed snow shadows

parent f2ba925d
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ mesh create_terrain_mesh(int N, float terrain_length)
//blending parameter for color
perlin_noise = parameters.terrain_height * noise_perlin(vec2(3 * x / terrain_length, 3 * y / terrain_length), parameters.octave, parameters.persistency, parameters.frequency_gain);
float b = exp((z+perlin_noise-20)/2)/exp(6);
float b = std::min(2.0, exp((z+perlin_noise-20)/2)/exp(6));
terrain.color[kv + N * ku] = (1-b)*vec3(0,0.3f,0) + b * vec3(1, 1, 1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment