summary refs log tree commit diff stats
path: root/shaders/bloom1.fragment
blob: ed9e10d92a98142554ee295e806ed4088f8242ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#version 330 core

in vec2 UV;

out vec4 color;

uniform vec2 offset;
uniform sampler2D inTex;

void main()
{
  vec3 mval = vec3(0.0);
  mval += (5.0/16.0) * texture(inTex, UV - offset).rgb;
  mval += (6.0/16.0) * texture(inTex, UV).rgb;
  mval += (5.0/16.0) * texture(inTex, UV + offset).rgb;
  color = vec4(mval, 1.0);
}