armory/Shaders/bloom_pass/bloom_pass.frag.glsl
Alexander 60f72e7e0e Merge in PPM
Redone and ready to be merged with Armory
2020-03-04 17:45:19 +01:00

31 lines
499 B
GLSL
Executable file

#version 450
#include "compiled.inc"
uniform sampler2D tex;
uniform vec3 PPComp10;
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));
#ifdef _CPostprocess
if (brightness > PPComp10.z) {
fragColor.rgb = col;
}
else {
fragColor.rgb = vec3(0.0);
}
#else
if (brightness > bloomThreshold) {
fragColor.rgb = col;
}
else {
fragColor.rgb = vec3(0.0);
}
#endif
}