16 lines
306 B
GLSL
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
|