Browse Source

tweaked point filled circle shader

Alexander Rose 6 năm trước cách đây
mục cha
commit
78ee23a8c8
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/mol-gl/shader/point.frag

+ 2 - 2
src/mol-gl/shader/point.frag

@@ -27,9 +27,9 @@ void main(){
 
         #ifdef dPointFilledCircle
             float dist = distance(gl_PointCoord, center);
-            float alpha = 1.0 - smoothstep(radius - uPointEdgeBleach * 2.0, radius, dist);
+            float alpha = 1.0 - smoothstep(radius - uPointEdgeBleach, radius, dist);
+            if (alpha < 0.0001) discard;
             gl_FragColor.a *= alpha;
-            if (gl_FragColor.a < 0.1) discard;
         #endif
 
         #pragma glslify: import('./chunks/apply-marker-color.glsl')