#version 330 core

layout(location = 0) in vec3 direction;
layout(location = 1) in float brightness;
layout(location = 2) in float starSize;

uniform mat4 projectionView;
uniform float visibility;

out float starAlpha;

void main() {
    gl_Position = projectionView * vec4(direction * 500.0, 1.0);
    gl_PointSize = starSize;
    starAlpha = brightness * visibility;
}
