#version 430 core layout (location = 0) out vec4 outColor; layout (location = 1) out vec4 BrightColor; uniform samplerCube skybox; in vec3 texCoord; void main() { vec4 texColor = texture(skybox, texCoord); float brightness = dot(texColor.rgb, vec3(0.2126, 0.7152, 0.0722)); if (brightness > 0.2) BrightColor = vec4(texColor.rgb, 1.0); else BrightColor = vec4(0.0, 0.0, 0.0, 1.0); outColor = texColor; }