Blur behind buttons/sprites should now be working as intended.

This commit is contained in:
Tleety
2016-03-08 11:14:09 +01:00
parent 6b7f598c4d
commit 01f29b6d4e
13 changed files with 6053 additions and 250 deletions
+11 -5
View File
@@ -1,14 +1,15 @@
#version 430
uniform sampler2D Texture0;
uniform sampler2D Texture1;
layout (binding = 0) uniform sampler2D Texture0;
layout (binding = 1)uniform sampler2D Texture1;
in VertexData{
vec2 TextureCoordinate;
}Input;
out vec4 fragmentColor;
out vec4 sceneColor;
out vec4 bloomColor;
void main()
{
@@ -17,9 +18,14 @@ void main()
float texel1_total = (texel1.r + texel1.g + texel1.b) * texel1.a;
texel1_total = ceil(clamp(texel1_total, 0, 1));
vec4 final = texel0 * texel1_total + texel1 * (1 - texel1_total);
vec4 result0 = texel0 * (1.0 - texel1_total);
vec4 result1 = texel1 * texel1_total;
//vec4 final = texel1 * texel1_total + texel0 * (1.0 - texel1_total);
//float res = 1.0 - texel1_total;
//vec4 final = vec4(texel1_total, texel1_total, texel1_total, 1.0);
fragmentColor = final;
sceneColor = result1;
bloomColor = vec4(0.0, 0.0, 0.0, 0.0);
}