#version 130
/**
 Apply to visible geometry
 */

uniform float       threshold;

in vec3             csNormal;
in vec3             csEye;
out vec3            color;

void main() {
    vec3 n = normalize(csNormal);
    vec3 e = normalize(csEye);

    bool edge = dot(n, e) < (1.0 - threshold);

    color = edge ? vec3(0.0) : vec3(1.0);
}
