From 06ba3c8c3e23fe9660fde7d77dbae8969bef7331 Mon Sep 17 00:00:00 2001 From: ExMix Date: Fri, 19 Jun 2015 15:49:55 +0300 Subject: [PATCH] [drape] render loop builded that way to avoid discard of pixels --- drape/shaders/line_fragment_shader.fsh | 6 +----- drape/shaders/texturing_fragment_shader.fsh | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drape/shaders/line_fragment_shader.fsh b/drape/shaders/line_fragment_shader.fsh index 785d84ee00..d646a9ec75 100644 --- a/drape/shaders/line_fragment_shader.fsh +++ b/drape/shaders/line_fragment_shader.fsh @@ -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; } diff --git a/drape/shaders/texturing_fragment_shader.fsh b/drape/shaders/texturing_fragment_shader.fsh index 8cce8ee43e..1f70af3dca 100644 --- a/drape/shaders/texturing_fragment_shader.fsh +++ b/drape/shaders/texturing_fragment_shader.fsh @@ -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; }