浏览代码

fix shader dColorType_groupInstance texture read

Alexander Rose 6 年之前
父节点
当前提交
46e2014297
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)