15 lines
300 B
GLSL
15 lines
300 B
GLSL
#version 450 core
|
|
layout (location=0) out vec4 fCol;
|
|
layout (location=1) out vec4 fPos;
|
|
in vec4 gColC;
|
|
in vec4 gColE;
|
|
in vec3 gPos;
|
|
in vec2 gBoundingBox;
|
|
void main() {
|
|
float d = dot(gBoundingBox,gBoundingBox);
|
|
if ( d > 1) { discard; }
|
|
fCol = mix (gColE , gColC, d);
|
|
fPos = vec4(gPos,1);
|
|
|
|
}
|