Explorar o código

fix shader marking issue

Alexander Rose %!s(int64=6) %!d(string=hai) anos
pai
achega
a6cfdf9fdd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/mol-gl/shader/chunks/apply-marker-color.glsl

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

@@ -1,6 +1,6 @@
 // only mark elements with an alpha above the picking threshold
 if (uAlpha >= uPickingAlphaThreshold) {
-    float marker = vMarker * 255.0;
+    float marker = floor(vMarker * 255.0 + 0.5); // rounding required to work on some cards on win
     if (marker > 0.1) {
         if (intMod(marker, 2.0) > 0.1) {
             gl_FragColor.rgb = mix(uHighlightColor, gl_FragColor.rgb, 0.3);