//deprecated file
void vc(inout vec3 scenecol) {
    const int steps     = s_vcSamples;
    const float scatterCoeff = 1.0;

    const float bufferSpace = s_vcThickness*0.066;
    const float lowEdge     = vc_lowEdge-bufferSpace;
    const float highEdge    = vc_highEdge+bufferSpace;

    /* --- calculate spheres --- */
    vec3 wvec       = mat3(gbufferModelViewInverse)*vec.view;
    vec2 psphere    = rsi((planetRadius+eyeAltitude)*vec.up, vec.view, planetRadius);
    bool visible    = !((eyeAltitude<lowEdge && psphere.y>0.0) || (eyeAltitude>highEdge && wvec.y>0.0));

    if (visible) {
        vec2 bsphere    = rsi(vec3(0.0, 1.0, 0.0)*planetRadius+eyeAltitude, wvec, planetRadius+lowEdge);
        vec2 tsphere    = rsi(vec3(0.0, 1.0, 0.0)*planetRadius+eyeAltitude, wvec, planetRadius+highEdge);
    
        float startdist = eyeAltitude>highEdge ? tsphere.x : bsphere.y;
        float enddist   = eyeAltitude>highEdge ? bsphere.x : tsphere.y;

        vec3 startpos   = wvec*startdist;
        vec3 endpos     = wvec*enddist;

        float mrange    = (1.0-saturate((eyeAltitude-highEdge)*0.2)) * (1.0-saturate((lowEdge-eyeAltitude)*0.2));
            mrange      = mix(1.0, mrange, float(!mask.terrain));

        startpos        = mix(startpos, gbufferModelViewInverse[3].xyz, mrange);
        endpos          = mix(endpos, (pos.world-pos.camera)*(!mask.terrain ? (highEdge/64.0) : 1.0), mrange);

        startpos        = planetCurvePosition(startpos);
        endpos          = planetCurvePosition(endpos);

        float dither    = ditherDynamic;

        vec3 rstep      = (endpos-startpos)/steps;
        vec3 rpos       = rstep*dither+startpos+pos.camera;

        float rlength   = length(rstep);

        float scatter   = 1.0;
        float transmittance = 1.0;
        float cloud     = 0.0;
        float fade      = 1.0;
        float vDotL     = light.vDotL;

        vec3 sunlight   = light.sunlight;
        vec3 skylight   = light.skylight;

        for (int i = 0; i<steps; ++i, rpos += rstep) {
            float dist  = length(rpos-pos.camera);
            float dfade = linStep(dist, 4000.0, 16000.0);
            if (finv(dfade)<0.01) continue;
            
            float oD    = shapeFunction(rpos)*rlength;
            if (oD <= 0.0) continue;

            cloud      += oD;
            float stepT = exp2(-oD*1.11*invLog2);

            fade       -= dfade*transmittance;

            //lighting function here

            transmittance *= stepT;
        }

            cloud   = saturate(cloud);
        vec3 color  = mix(skylight, sunlight, scatter);

        scenecol    = mix(scenecol, color, cloud);
    }
}