Mapsforge themes compatibility (#388) #100

This commit is contained in:
Longri
2017-08-23 12:22:52 +02:00
committed by Emux
parent f6d2db4c6f
commit b695d43fee
18 changed files with 1565 additions and 20 deletions

View File

@@ -43,10 +43,15 @@ uniform sampler2D tex;
uniform float u_mode;
void
main(){
if (u_mode == 1.0) {
vec4 c=texture2D(tex,vec2(abs(mod(v_st.s+1.0,2.0)),(v_st.t+1.0)*0.5));
if (u_mode >= 1.0) {
float step= 2.0;
if (u_mode == 3.0){// dashed texture
step =1.0;
}
vec4 c=texture2D(tex,vec2(abs(mod(v_st.s+1.0,step)),(v_st.t+1.0)*0.5));
float fuzz=fwidth(c.a);
gl_FragColor=(c * u_color) *smoothstep(0.5-fuzz,0.5+fuzz,c.a);
gl_FragColor=(c * u_color) * smoothstep(0.5-fuzz,0.5+fuzz,c.a);
}
else {
/* distance on perpendicular to the line */