export declare const assign_color_varying = "\n#if defined(dRenderVariant_color)\n    #if defined(dColorType_attribute)\n        vColor.rgb = aColor;\n    #elif defined(dColorType_instance)\n        vColor.rgb = readFromTexture(tColor, aInstance, uColorTexDim).rgb;\n    #elif defined(dColorType_group)\n        vColor.rgb = readFromTexture(tColor, group, uColorTexDim).rgb;\n    #elif defined(dColorType_groupInstance)\n        vColor.rgb = readFromTexture(tColor, aInstance * float(uGroupCount) + group, uColorTexDim).rgb;\n    #elif defined(dColorType_vertex)\n        vColor.rgb = readFromTexture(tColor, VertexID, uColorTexDim).rgb;\n    #elif defined(dColorType_vertexInstance)\n        vColor.rgb = readFromTexture(tColor, int(aInstance) * uVertexCount + VertexID, uColorTexDim).rgb;\n    #elif defined(dColorType_volume)\n        vec3 cgridPos = (uColorGridTransform.w * (position - uColorGridTransform.xyz)) / uColorGridDim;\n        vColor.rgb = texture3dFrom2dLinear(tColorGrid, cgridPos, uColorGridDim, uColorTexDim).rgb;\n    #elif defined(dColorType_volumeInstance)\n        vec3 cgridPos = (uColorGridTransform.w * (vModelPosition - uColorGridTransform.xyz)) / uColorGridDim;\n        vColor.rgb = texture3dFrom2dLinear(tColorGrid, cgridPos, uColorGridDim, uColorTexDim).rgb;\n    #endif\n\n    #ifdef dUsePalette\n        vPaletteV = ((vColor.r * 256.0 * 256.0 * 255.0 + vColor.g * 256.0 * 255.0 + vColor.b * 255.0) - 1.0) / 16777215.0;\n    #endif\n\n    #ifdef dOverpaint\n        #if defined(dOverpaintType_instance)\n            vOverpaint = readFromTexture(tOverpaint, aInstance, uOverpaintTexDim);\n        #elif defined(dOverpaintType_groupInstance)\n            vOverpaint = readFromTexture(tOverpaint, aInstance * float(uGroupCount) + group, uOverpaintTexDim);\n        #elif defined(dOverpaintType_vertexInstance)\n            vOverpaint = readFromTexture(tOverpaint, int(aInstance) * uVertexCount + VertexID, uOverpaintTexDim);\n        #elif defined(dOverpaintType_volumeInstance)\n            vec3 ogridPos = (uOverpaintGridTransform.w * (vModelPosition - uOverpaintGridTransform.xyz)) / uOverpaintGridDim;\n            vOverpaint = texture3dFrom2dLinear(tOverpaintGrid, ogridPos, uOverpaintGridDim, uOverpaintTexDim);\n        #endif\n\n        // pre-mix to avoid darkening due to empty overpaint\n        #ifdef dColorType_uniform\n            vOverpaint.rgb = mix(uColor.rgb, vOverpaint.rgb, vOverpaint.a);\n        #else\n            vOverpaint.rgb = mix(vColor.rgb, vOverpaint.rgb, vOverpaint.a);\n        #endif\n    #endif\n\n    #ifdef dSubstance\n        #if defined(dSubstanceType_instance)\n            vSubstance = readFromTexture(tSubstance, aInstance, uSubstanceTexDim);\n        #elif defined(dSubstanceType_groupInstance)\n            vSubstance = readFromTexture(tSubstance, aInstance * float(uGroupCount) + group, uSubstanceTexDim);\n        #elif defined(dSubstanceType_vertexInstance)\n            vSubstance = readFromTexture(tSubstance, int(aInstance) * uVertexCount + VertexID, uSubstanceTexDim);\n        #elif defined(dSubstanceType_volumeInstance)\n            vec3 sgridPos = (uSubstanceGridTransform.w * (vModelPosition - uSubstanceGridTransform.xyz)) / uSubstanceGridDim;\n            vSubstance = texture3dFrom2dLinear(tSubstanceGrid, sgridPos, uSubstanceGridDim, uSubstanceTexDim);\n        #endif\n\n        // pre-mix to avoid artifacts due to empty substance\n        vSubstance.rgb = mix(vec3(uMetalness, uRoughness, uBumpiness), vSubstance.rgb, vSubstance.a);\n    #endif\n#elif defined(dRenderVariant_pick)\n    #ifdef requiredDrawBuffers\n        vObject = vec4(packIntToRGB(float(uObjectId)), 1.0);\n        vInstance = vec4(packIntToRGB(aInstance), 1.0);\n        vGroup = vec4(packIntToRGB(group), 1.0);\n    #else\n        if (uPickType == 1) {\n            vColor = vec4(packIntToRGB(float(uObjectId)), 1.0);\n        } else if (uPickType == 2) {\n            vColor = vec4(packIntToRGB(aInstance), 1.0);\n        } else {\n            vColor = vec4(packIntToRGB(group), 1.0);\n        }\n    #endif\n#endif\n\n#ifdef dTransparency\n    #if defined(dTransparencyType_instance)\n        vTransparency = readFromTexture(tTransparency, aInstance, uTransparencyTexDim).a;\n    #elif defined(dTransparencyType_groupInstance)\n        vTransparency = readFromTexture(tTransparency, aInstance * float(uGroupCount) + group, uTransparencyTexDim).a;\n    #elif defined(dTransparencyType_vertexInstance)\n        vTransparency = readFromTexture(tTransparency, int(aInstance) * uVertexCount + VertexID, uTransparencyTexDim).a;\n    #elif defined(dTransparencyType_volumeInstance)\n        vec3 tgridPos = (uTransparencyGridTransform.w * (vModelPosition - uTransparencyGridTransform.xyz)) / uTransparencyGridDim;\n        vTransparency = texture3dFrom2dLinear(tTransparencyGrid, tgridPos, uTransparencyGridDim, uTransparencyTexDim).a;\n    #endif\n#endif\n";
