Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
uniform sampler2D hdrSampler;

in vec2 texCoord;

out vec4 outBrightColor;

void main() {
    vec3 hdrPixel = texture(hdrSampler, texCoord).rgb;

    if (S_Luminance(hdrPixel) > 1.0) {
        outBrightColor = vec4(hdrPixel, 0.0);
    } else {
        outBrightColor = vec4(0.0);
    }
}