2024-02-20 21:33:03 +01:00
|
|
|
#version 430 core
|
|
|
|
|
2024-02-28 19:19:59 +01:00
|
|
|
layout (location = 0) out vec4 outColor;
|
|
|
|
layout (location = 1) out vec4 BrightColor;
|
|
|
|
|
2024-02-20 21:33:03 +01:00
|
|
|
uniform samplerCube skybox;
|
|
|
|
|
|
|
|
in vec3 texCoord;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2024-02-28 19:19:59 +01:00
|
|
|
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;
|
|
|
|
}
|