Files
comaps/shaders/GL/dashed_line.fsh.glsl
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

29 lines
758 B
GLSL

varying vec2 v_colorTexCoord;
varying vec2 v_maskTexCoord;
//varying vec2 v_halfLength;
uniform sampler2D u_colorTex;
uniform sampler2D u_maskTex;
uniform float u_opacity;
//const float aaPixelsCount = 2.5;
void main()
{
vec4 color = texture2D(u_colorTex, v_colorTexCoord);
#ifdef GLES3
float mask = texture2D(u_maskTex, v_maskTexCoord).r;
#else
float mask = texture2D(u_maskTex, v_maskTexCoord).a;
#endif
color.a = color.a * mask * u_opacity;
// Disabled too agressive AA-like blurring of edges,
// see https://github.com/organicmaps/organicmaps/issues/6583.
//float currentW = abs(v_halfLength.x);
//float diff = v_halfLength.y - currentW;
//color.a *= mix(0.3, 1.0, clamp(diff / aaPixelsCount, 0.0, 1.0));
gl_FragColor = color;
}