diff --git a/packages/layers/src/point/shaders/fill_frag.glsl b/packages/layers/src/point/shaders/fill_frag.glsl index abfec4fa9b..52285d9ece 100644 --- a/packages/layers/src/point/shaders/fill_frag.glsl +++ b/packages/layers/src/point/shaders/fill_frag.glsl @@ -71,7 +71,7 @@ void main() { // 付出的代价是边缘会有一些锯齿 if(outer_df > antialiasblur + 0.018) discard; } - float opacity_t = smoothstep(0.0, antialiasblur, outer_df); + float opacity_t = smoothstep(0.0, antialiasblur, outer_df); float color_t = strokeWidth < 0.01 ? 0.0 : smoothstep( antialiasblur, @@ -82,7 +82,13 @@ void main() { float N_RINGS = 3.0; float FREQ = 1.0; - gl_FragColor = mix(vec4(v_color.rgb, v_color.a * opacity), strokeColor * stroke_opacity, color_t); + if(strokeWidth < 0.01) { + gl_FragColor = vec4(v_color.rgb, v_color.a * opacity); + } else { + gl_FragColor = mix(vec4(v_color.rgb, v_color.a * opacity), strokeColor * stroke_opacity, color_t); + } + + // gl_FragColor = mix(vec4(v_color.rgb, v_color.a * opacity), strokeColor * stroke_opacity, color_t); if(u_aimate.x == Animate) { float d = length(v_data.xy); @@ -105,10 +111,14 @@ void main() { } else { gl_FragColor = filterColor(gl_FragColor); } - } else { gl_FragColor = filterColor(gl_FragColor); + } - gl_FragColor *= opacity_t; + if(u_additive > 0.0) { + gl_FragColor *= opacity_t; + } else { + gl_FragColor.a *= opacity_t; + } } diff --git a/stories/Map/components/mapCenter.tsx b/stories/Map/components/mapCenter.tsx index 8cac7cf114..2cc949284f 100644 --- a/stories/Map/components/mapCenter.tsx +++ b/stories/Map/components/mapCenter.tsx @@ -78,13 +78,14 @@ export default class GaodeMapComponent extends React.Component { }, ) .shape('circle') - .color('#00f') + .color('#0f9') .size(circleRadius) .style({ stroke: '#f00', // strokeWidth: 10, + strokeWidth: 0, strokeOpacity: 1, - unit: 'meter', + // unit: 'meter', }) // .animate(true) .active({ color: '#00f' });