 
 uniform sampler3D volumeSampler;
 
+#define transferFunctionRowCount 64.0f
+
+// TODO(SIR): move to hglsl
 struct Tex2DAddress
 {
   uint64_t Container;

  VolumeData volumes[];
};

// 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);

        vec4 transferFunction = Texture(volumes[0].textureAddress, vec2(texCoord.x, volumes[0].transferFunctionRow));
        current_fragment.color = transferFunction;
      }

    }
