armory/Shaders/bloom_pass/bloom_pass.frag.glsl
2018-12-05 17:47:45 +01:00

20 lines
328 B
GLSL
Executable file

#version 450
#include "compiled.inc"
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);
}
}