Browse Source

wip, gpu mc webgl1 tweak

Alexander Rose 4 years ago
parent
commit
4588fdd5d5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/mol-gl/shader/marching-cubes/isosurface.frag.ts

+ 2 - 2
src/mol-gl/shader/marching-cubes/isosurface.frag.ts

@@ -182,8 +182,8 @@ void main(void) {
     // group id
     #if __VERSION__ == 100
         // webgl1 does not support 'flat' interpolation (i.e. no interpolation)
-        // so we provide a constant that stands for 'unknown-group'
-        gl_FragData[0].w = 16777216.0;
+        // so we ensure a constant group id per triangle
+        gl_FragData[0].w = decodeFloatRGB(voxel(coord3d).rgb);
     #else
         gl_FragData[0].w = t < 0.5 ? decodeFloatRGB(d0.rgb) : decodeFloatRGB(d1.rgb);
     #endif