From 224645d1071c14b4829dbb3ae35870868fcff85a Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 13 Feb 2018 23:00:10 -0500 Subject: 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 --- shaders/bloom1.fragment | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'shaders/bloom1.fragment') 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 @@ in vec2 UV; -out vec3 color; +out vec4 color; uniform vec2 offset; uniform sampler2D inTex; void main() { - color = vec3(0.0); - color += (5.0/16.0) * texture(inTex, UV - offset).rgb; - color += (6.0/16.0) * texture(inTex, UV).rgb; - color += (5.0/16.0) * texture(inTex, UV + offset).rgb; + 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); } -- cgit 1.4.1