 
     float t = (uIsoValue - v0) / (v0 - v1);
     // t = -0.5;
-    gl_FragColor.xyz = (uGridTransform * vec4(b0 + t * (b0 - b1), 1.0)).xyz;
-    gl_FragColor.w = decodeFloatRGB(d0.rgb); // group id
+    gl_FragData[0].xyz = (uGridTransform * vec4(b0 + t * (b0 - b1), 1.0)).xyz;
+    gl_FragData[0].w = decodeFloatRGB(d0.rgb); // group id
 
     // normals from gradients
     vec3 n0 = -normalize(vec3(

vec4 voxel(vec3 pos) {
    return texture3dFrom2dNearest(tVolumeData, pos, uGridDim, uGridTexDim.xy);
}

#pragma glslify: decodeFloatRGB = require(../utils/decode-float-rgb.glsl)

void main(void) {
    // get 1D index

uniform vec2 uScale;

varying vec2 vCoordinate;

#pragma glslify: import('../chunks/common.glsl')
#pragma glslify: decodeFloatRGB = require(../utils/decode-float-rgb.glsl)

// cube corners
const vec3 c0 = vec3(0., 0., 0.);
