SWBF2-Classic-Msh-Viewer/QtMeshViewer/Resources/fshader.glsl

25 lines
375 B
Plaintext
Raw Normal View History

#ifdef GL_ES
// Set default precision to medium
precision mediump int;
precision mediump float;
#endif
uniform sampler2D texture;
2017-01-15 14:51:12 +00:00
uniform bool b_transparent;
varying vec2 v_texcoord;
void main()
{
// Set fragment color from texture
vec4 finalColor = vec4(texture2D(texture, v_texcoord));
2017-01-15 14:51:12 +00:00
if(!b_transparent)
{
finalColor.a = 1.0f;
}
gl_FragColor = finalColor;
}