Browse Source

fix shader dColorType_groupInstance texture read

Alexander Rose 6 years ago
parent
commit
46e2014297
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-gl/shader/chunks/assign-color-varying.glsl

+ 1 - 1
src/mol-gl/shader/chunks/assign-color-varying.glsl

@@ -5,7 +5,7 @@
 #elif defined(dColorType_group)
     vColor.rgb = readFromTexture(tColor, aGroup, uColorTexDim).rgb;
 #elif defined(dColorType_groupInstance)
-    vColor.rgb = readFromTexture(tColor, aGroup * float(uGroupCount) + aGroup, uColorTexDim).rgb;
+    vColor.rgb = readFromTexture(tColor, aInstance * float(uGroupCount) + aGroup, uColorTexDim).rgb;
 #elif defined(dColorType_objectPicking)
     vColor = encodeIdRGBA(float(uObjectId));
 #elif defined(dColorType_instancePicking)