Files
loop/shader/ellipse.frag
T
2021-03-10 21:22:52 +01:00

16 lines
306 B
GLSL

#version 430 core
in vec4 gColorC;
in vec4 gColorE;
in vec2 gBoundingBox;
out vec4 fColor;
//out float gl_FragDepth;
void main()
{
float d = dot(gBoundingBox,gBoundingBox);
if ( d > 1) { discard; }
fColor = mix (gColorE , gColorC, d);
}
//note it is the fragdepth that stops this from being square