support transparency now
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user