forked from organicmaps/organicmaps
Fixed alpha channel of outline in GPS-track rendering
This commit is contained in:
parent
ae7bb5e1da
commit
47cb6dfc13
2 changed files with 4 additions and 2 deletions
|
@ -47,6 +47,8 @@ OTHER_FILES += \
|
|||
shaders/texturing_billboard_vertex_shader.vsh \
|
||||
shaders/texturing_fragment_shader.fsh \
|
||||
shaders/texturing_vertex_shader.vsh \
|
||||
shaders/trackpoint_vertex_shader.vsh \
|
||||
shaders/trackpoint_fragment_shader.fsh \
|
||||
shaders/transparent_layer_fragment_shader.fsh \
|
||||
shaders/transparent_layer_vertex_shader.vsh \
|
||||
shaders/user_mark.vsh \
|
||||
|
|
|
@ -5,7 +5,7 @@ varying vec3 v_radius;
|
|||
varying vec4 v_color;
|
||||
|
||||
const float kAntialiasingScalar = 0.9;
|
||||
const vec4 kOutlineColor = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
const vec3 kOutlineColor = vec3(1.0, 1.0, 1.0);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ void main(void)
|
|||
|
||||
float shiftedRadius = v_radius.z - u_radiusShift;
|
||||
float aaRadius = shiftedRadius * kAntialiasingScalar;
|
||||
vec4 finalColor = mix(v_color, kOutlineColor, smoothstep(aaRadius * aaRadius, shiftedRadius * shiftedRadius, d));
|
||||
vec4 finalColor = vec4(mix(v_color.rgb, kOutlineColor, smoothstep(aaRadius * aaRadius, shiftedRadius * shiftedRadius, d)), v_color.a);
|
||||
|
||||
aaRadius = v_radius.z * kAntialiasingScalar;
|
||||
float stepValue = smoothstep(aaRadius * aaRadius, v_radius.z * v_radius.z, d);
|
||||
|
|
Loading…
Add table
Reference in a new issue