Files
armorpaint/Shaders/common/bloom_pass.frag.glsl
T
2019-08-22 12:05:03 +02:00

20 lines
338 B
GLSL

#version 450
const float bloomThreshold = 1.5;
uniform sampler2D tex;
in vec2 texCoord;
out vec4 fragColor;
void main() {
vec3 col = textureLod(tex, texCoord, 0.0).rgb;
float brightness = dot(col, vec3(0.2126, 0.7152, 0.0722));
if (brightness > bloomThreshold) {
fragColor.rgb = col;
}
else {
fragColor.rgb = vec3(0.0);
}
}