 vec2 decart(vec2 polar)
 {
     return polar.x * CS(polar.y);
+}
+
+float transit(float min0, float max0, float min1, float max1, float val)
+{
+    return (val - min0) / (max0 - min0) * (max1 - min1) + min1;
 }
 
 vec2 polar(vec2 dec)

    pMat[2][3] = -1.0;
    pMat[3][2] = 2.0 * near * far / (far - near);
    
    float centLen = length(center);
    float R = 0.0;
    for (int i = 0; i < NumStars; ++i)
    {


        vec4 persPos = pMat * dPos;
        persPos.xy = persPos.xy * centLen / persPos.w;
        float transVal = transit(0.0, 1.0, 0.3, 1.0, locFTime);
        float intens = Intensity * transVal;
        R += pressence(persPos.xyz, Radius * transVal) * intens;
    }
    color = vec4(R, R, R, 1.);
}
