 
         if ( id > 0.1 ) {
           vec4 HSV = vec4( mod( 6.0 * id * golden_ratio, 6.0), 1.0, 1.0, 1.0 );
-          gl_FragColor = (1.0 - alpha/100.0) * vec4(data_color, 1.0) + alpha/100.0 * hsv_to_rgb( HSV );
+          gl_FragColor = mix( vec4(data_color, 1.0), hsv_to_rgb(HSV), alpha );
         } else {
           gl_FragColor = vec4(data_color, 1.0);
         }

            data_color += color_value * <%= name %>_weight * <%= name %>_color;

          <% }) %> ;
        <% } %>



      @uniforms.repeat.value.set repeat.x, repeat.y

    @material.setSegmentationAlpha = (alpha) =>
      @uniforms.alpha.value = alpha / 100


  setupChangeListeners : ->
