60f72e7e0e
Redone and ready to be merged with Armory
30 lines
499 B
GLSL
Executable file
30 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
|
|
}
|