support transparency now

This commit is contained in:
Anakin
2017-01-15 15:51:12 +01:00
parent b8f8a5c2ad
commit 454ed45fa1
5 changed files with 103 additions and 23 deletions

View File

@@ -6,6 +6,8 @@ precision mediump float;
uniform sampler2D texture;
uniform bool b_transparent;
varying vec2 v_texcoord;
void main()
@@ -13,5 +15,10 @@ void main()
// Set fragment color from texture
vec4 finalColor = vec4(texture2D(texture, v_texcoord));
if(!b_transparent)
{
finalColor.a = 1.0f;
}
gl_FragColor = finalColor;
}