summary refs log tree commit diff stats
path: root/shaders/bloom1.fragment
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-02-13 23:00:10 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-02-13 23:00:10 -0500
commit224645d1071c14b4829dbb3ae35870868fcff85a (patch)
treef84f540eee09315eb0a689c523946ffa03f4fea0 /shaders/bloom1.fragment
parent3df19e45e737a1b9395a9a258e3263e444ebedd7 (diff)
downloadtherapy-224645d1071c14b4829dbb3ae35870868fcff85a.tar.gz
therapy-224645d1071c14b4829dbb3ae35870868fcff85a.tar.bz2
therapy-224645d1071c14b4829dbb3ae35870868fcff85a.zip
Fixed inconsistent rendering failure
The issue appears to have been caused by blending with unset alpha channels.

Also included the re-ordered player character sprite image.

The CMake file has been updated to include linking against some Apple libraries that are usually already included in GLFW3.

refs #1
Diffstat (limited to 'shaders/bloom1.fragment')
-rw-r--r--shaders/bloom1.fragment11
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
3in vec2 UV; 3in vec2 UV;
4 4
5out vec3 color; 5out vec4 color;
6 6
7uniform vec2 offset; 7uniform vec2 offset;
8uniform sampler2D inTex; 8uniform sampler2D inTex;
9 9
10void main() 10void 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}