forked from organicmaps/organicmaps
[drape] render loop builded that way to avoid discard of pixels
This commit is contained in:
parent
90094244ed
commit
06ba3c8c3e
2 changed files with 1 additions and 8 deletions
|
@ -7,11 +7,7 @@ uniform float u_opacity;
|
|||
|
||||
void main(void)
|
||||
{
|
||||
float mask = texture2D(u_maskTex, v_maskTexCoord).a;
|
||||
if (mask < 0.1)
|
||||
discard;
|
||||
|
||||
vec4 color = texture2D(u_colorTex, v_colorTexCoord);
|
||||
color.a *= u_opacity;
|
||||
color.a *= (u_opacity * texture2D(u_maskTex, v_maskTexCoord).a);
|
||||
gl_FragColor = color;
|
||||
}
|
||||
|
|
|
@ -6,9 +6,6 @@ varying vec2 v_colorTexCoords;
|
|||
void main(void)
|
||||
{
|
||||
vec4 finalColor = texture2D(u_colorTex, v_colorTexCoords);
|
||||
if (finalColor.a < 0.1)
|
||||
discard;
|
||||
|
||||
finalColor.a *= u_opacity;
|
||||
gl_FragColor = finalColor;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue