mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-29 23:22:55 +00:00
e7405e98df
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
33 lines
508 B
GLSL
33 lines
508 B
GLSL
uniform sampler2D u_DiffuseMap;
|
|
|
|
uniform int u_AlphaTest;
|
|
|
|
varying vec2 var_DiffuseTex;
|
|
|
|
varying vec4 var_Color;
|
|
|
|
|
|
void main()
|
|
{
|
|
vec4 color = texture2D(u_DiffuseMap, var_DiffuseTex);
|
|
|
|
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;
|
|
}
|