2016-04-01 01:48:18 +02:00
|
|
|
#version 450
|
|
|
|
|
2018-08-30 15:42:25 +02:00
|
|
|
#include "compiled.inc"
|
2016-07-18 20:28:52 +02:00
|
|
|
|
2016-04-01 01:48:18 +02:00
|
|
|
uniform sampler2D tex;
|
|
|
|
|
2021-09-02 17:14:18 +02:00
|
|
|
#ifdef _CPostprocess
|
2020-03-04 17:45:19 +01:00
|
|
|
uniform vec3 PPComp10;
|
2021-09-02 17:14:18 +02:00
|
|
|
#endif
|
2020-03-04 17:45:19 +01:00
|
|
|
|
2016-04-01 01:48:18 +02:00
|
|
|
in vec2 texCoord;
|
2016-10-12 17:52:27 +02:00
|
|
|
out vec4 fragColor;
|
2016-04-01 01:48:18 +02:00
|
|
|
|
|
|
|
void main() {
|
2018-12-05 17:47:45 +01:00
|
|
|
vec3 col = textureLod(tex, texCoord, 0.0).rgb;
|
|
|
|
float brightness = dot(col, vec3(0.2126, 0.7152, 0.0722));
|
2020-03-04 17:45:19 +01:00
|
|
|
#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
|
2016-04-01 01:48:18 +02:00
|
|
|
}
|