#version 330 core // Input vertex data, different for all executions of this shader. layout(location = 0) in vec4 position; out float colorF; void main() { if (position.z <= 0.0) colorF = 0; else colorF = 1; gl_Position = position; }