
    return vec4(r, g, b, 1.0);
}

    vec3 VOLUME_EMISSION(in vec3 emission_ui, in vec3 X)
    {
        float r = length(X);
        //if (r > 5.0*R) return vec3(0.0);
        float mu = X.z / max(r, 1.0e-10);
        float phi = atan(X.y, X.x); 
        float R = ${R_func}(r);
        float psi_re = ${Y_func}_re(mu, phi) * R;
        float psi_im = ${Y_func}_im(mu, phi) * R; 
        float phase = atan(psi_im, psi_re);
        float amplitude = sqrt(psi_re*psi_re + psi_im*psi_im);
        float t = mod(p