ripple/displayTerrain.frag

18 lines
254 B
GLSL
Raw Normal View History

2017-11-28 17:35:49 +00:00
#version 410
#define PI 3.14159265359
out vec4 Color;
in Attribs {
vec3 pos;
} In;
void main(void)
{
if (In.pos.y < - 0.1)
discard; /* Fragment underwater */
Color.rgb = (0.25 + 0.75 * In.pos.y) * vec3(0.75);
Color.a = 1.0;
}