14 lines
334 B
GLSL
14 lines
334 B
GLSL
#version 330 core
|
|
in float Height;
|
|
out vec4 FragColor;
|
|
|
|
void main() {
|
|
float h = (Height + 16)/32.0f; // shift and scale the height into a grayscale value
|
|
// FragColor = vec4(h, h, h, 1.0);
|
|
if (Height < 1.01f) {
|
|
FragColor = vec4(0.2f, 0.3f, 0.3f, 1.0f);
|
|
} else {
|
|
FragColor = vec4(1, 1, 1, 1.0);
|
|
}
|
|
}
|