armory/Shaders/histogram_pass/histogram_pass.frag.glsl

19 lines
433 B
Plaintext
Raw Normal View History

2019-04-22 14:11:17 +02:00
#version 450
2019-05-01 10:52:42 +02:00
#include "compiled.inc"
2019-04-22 14:11:17 +02:00
uniform sampler2D tex;
in vec2 texCoord;
out vec4 fragColor;
void main() {
2019-05-01 10:52:42 +02:00
fragColor.a = 0.01 * autoExposureSpeed;
2019-04-22 14:11:17 +02:00
fragColor.rgb = textureLod(tex, vec2(0.5, 0.5), 0.0).rgb +
textureLod(tex, vec2(0.2, 0.2), 0.0).rgb +
textureLod(tex, vec2(0.8, 0.2), 0.0).rgb +
textureLod(tex, vec2(0.2, 0.8), 0.0).rgb +
textureLod(tex, vec2(0.8, 0.8), 0.0).rgb;
fragColor.rgb /= 5.0;
}