diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-17 15:55:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-17 15:55:37 -0400 |
commit | 90aadf3844386824140a20d7fbb847bc16009a94 (patch) | |
tree | 6f83fce90e71abb22b1a8f3e09c79963b2a34d5d /shaders/bloom1.fragment | |
parent | bc63fa57ced1c7329f7fdcfd168eaf7e290158bc (diff) | |
parent | 86f0106d0523825549f1e74b835688c78a10cf6c (diff) | |
download | therapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.gz therapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.bz2 therapy-90aadf3844386824140a20d7fbb847bc16009a94.zip |
Merge pull request #7 from hatkirby/es-rewrite
The ECS rewrite exceeds the original branch in functionality, so it is time to merge it in.
Diffstat (limited to 'shaders/bloom1.fragment')
-rw-r--r-- | shaders/bloom1.fragment | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/shaders/bloom1.fragment b/shaders/bloom1.fragment index 0a89ea1..ed9e10d 100644 --- a/shaders/bloom1.fragment +++ b/shaders/bloom1.fragment | |||
@@ -2,15 +2,16 @@ | |||
2 | 2 | ||
3 | in vec2 UV; | 3 | in vec2 UV; |
4 | 4 | ||
5 | out vec3 color; | 5 | out vec4 color; |
6 | 6 | ||
7 | uniform vec2 offset; | 7 | uniform vec2 offset; |
8 | uniform sampler2D inTex; | 8 | uniform sampler2D inTex; |
9 | 9 | ||
10 | void main() | 10 | void main() |
11 | { | 11 | { |
12 | color = vec3(0.0); | 12 | vec3 mval = vec3(0.0); |
13 | color += (5.0/16.0) * texture(inTex, UV - offset).rgb; | 13 | mval += (5.0/16.0) * texture(inTex, UV - offset).rgb; |
14 | color += (6.0/16.0) * texture(inTex, UV).rgb; | 14 | mval += (6.0/16.0) * texture(inTex, UV).rgb; |
15 | color += (5.0/16.0) * texture(inTex, UV + offset).rgb; | 15 | mval += (5.0/16.0) * texture(inTex, UV + offset).rgb; |
16 | color = vec4(mval, 1.0); | ||
16 | } | 17 | } |