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

25 lines
375 B
GLSL

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