   VolumeData volumes[];
 };
 
+// TODO(SIR): move to hglsl
+vec4 Texture(Tex2DAddress addr, vec2 uv)
+{
+  vec3 texc = vec3(uv.x * addr.texScale.x, uv.y * addr.texScale.y, addr.Page);
+
+  return texture(sampler2DArray(addr.Container), texc);
+}
+
 // Blending equation for in-order traversal
 vec4 blend(vec4 clr, vec4 srf)
 {

        vec4 texCoord = volumes[0].textureMatrix * inverse(viewMatrix) * current_fragment.eyePos;
        float value = texture(volumeSampler, texCoord.xyz).r;
        current_fragment.color.rgb = vec3(value);
      }

    }


uniform sampler3D volumeSampler;

#define transferFunctionRowCount 64.0f

// TODO(SIR): move to hglsl
struct Tex2DAddress
{
  uint64_t Container;
