6 uniform float HEIGHT_MIN;
7 uniform float HEIGHT_MAX;
8 uniform float write_playable;
13 // Simple remap from-to range.
14 float remap(float value, float low1, float high1, float low2, float high2)
16 return low2 + (value - low1) * (high2 - low2) / (high1 - low1);
21 float height = pow(remap(FragPos.y, HEIGHT_MIN, HEIGHT_MAX, 0, 1), 2.2);
23 FragColor = vec4(write_playable, height, 0, 1);