Browse Source

fix precision issues when rendering marker

Alexander Rose 6 years ago
parent
commit
a879c05b1f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/mol-gl/shader/chunks/apply-marker-color.glsl

+ 3 - 3
src/mol-gl/shader/chunks/apply-marker-color.glsl

@@ -1,6 +1,6 @@
-float marker = floor(vMarker * 255.0);
-if (marker != 0.0) {
-    if (mod(marker, 2.0) == 0.0) {
+float marker = vMarker * 255.0;
+if (marker > 0.1) {
+    if (mod(marker, 2.0) < 0.1) {
         gl_FragColor.rgb = mix(uHighlightColor, gl_FragColor.rgb, 0.3);
     } else {
         gl_FragColor.rgb = mix(uSelectColor, gl_FragColor.rgb, 0.3);