armory/Shaders/histogram_pass/histogram_pass.frag.glsl
2019-04-22 14:11:17 +02:00

18 lines
416 B
GLSL

#version 450
uniform sampler2D tex;
in vec2 texCoord;
out vec4 fragColor;
void main() {
const float speed = 0.01;
fragColor.a = speed;
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;
}