q3rally/engine/code/renderergl2/glsl/dlight_fp.glsl
zturtleman e7405e98df ioquake3 resync to revision 3331 from 3306.
OpenGL2: Use an OpenGL 3.2 core context if available
OpenGL2: Remove GLSL_ValidateProgram()
OpenGL2: Don't do MSAA resolve/shadow mask/SSAO on shadow views
OpenGL2: "Fix" cg_shadows 4
Fix score bonus for defending the flag carrier in CTF
Restore not giving defense score bonus to flag carrier
Add score bonus for defending the flag carrier in 1 Flag CTF
Move CON_Init ahead of Com_Init to avoid Windows dedicated server crash
Make 'globalservers 0' fetch all masters
OpenGL2: Don't use initialized arrays in glsl shaders
Echo server say/tell/sayto message to console
Don't try to remove non-existant command 'shaderstate'
Update internal curl to 7.54.0
Silence g_util.c warning about set but not read variable
Remove unused imgFlag_t value IMGFLAG_SRGB
Make warmup in Team Deathmatch wait for players to join both teams
Remove CVAR_PROTECTED from cl_renderer
Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits
Fix friction in AAS_ClientMovementPrediction
Fix floating point precision loss in renderer
Reject OpenGL contexts w/ software renderer when core context requested
2017-08-07 05:23:43 +00:00

32 lines
494 B
GLSL

uniform sampler2D u_DiffuseMap;
uniform int u_AlphaTest;
varying vec2 var_Tex1;
varying vec4 var_Color;
void main()
{
vec4 color = texture2D(u_DiffuseMap, var_Tex1);
float alpha = color.a * var_Color.a;
if (u_AlphaTest == 1)
{
if (alpha == 0.0)
discard;
}
else if (u_AlphaTest == 2)
{
if (alpha >= 0.5)
discard;
}
else if (u_AlphaTest == 3)
{
if (alpha < 0.5)
discard;
}
gl_FragColor.rgb = color.rgb * var_Color.rgb;
gl_FragColor.a = alpha;
}