         posIS += (residual - 1.0)*stepIS;
 
         // compute the scalar
-        vec4 tValue = getTextureValue(posIS);
+        tValue = getTextureValue(posIS);
 
         // now map through opacity and color
-        vec4 tColor = getColorForValue(tValue, posIS, tstep);
+        tColor = getColorForValue(tValue, posIS, tstep);
 
         float mix = (1.0 - color.a);
         color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;

      // residual distance
      posIS += (residual - 1.0) * stepIS;

      // compute the scalar
      scalar = getTextureValue(posIS).r;

      // Update the minimum/maximum value if necessary
      value = min(scalar, value);
    }

    // now map through opacity and color
    vec4 tcolor = texture2D(ctexture, vec2(value * cscale0 + cshift0, 0.5));
    tcolor.a = texture2D(otexture, vec2(value * oscale0 + oshift0, 0.5)).r;

    // compute the normal if needed
    //VTK::Normal::Impl

    // handle lighting
    //VTK::Light::Impl

    gl_FragData[0] = tColor;
  #endif
}

