Nice that you went through with it laugh
When I read the article after seeing your post I decided to delay better sky rendering for now tongue
The results seem pretty good, but the code to get there is by far not as straight forward as I would like it to be.
Also I would like to do this on a per fragment basis instead of doing most things per vertex using a sky sphere with an even polygon distribution for clean results.

From just a quick look at your code, I do recommend you to use a define for fSamples. I know that without at least the glsl compiler on my mac won´t unroll the loop and probably even take additional time for the cast to int. Especially real (as in not unrolled, dynamic) loops, have a serious performance impact.

Also about sky rendering in general: To make the sky appear behind everything you usually render the sky before everything else without depth writing and only applying the cameras rotation and projection matrix and if needed the skies rotation matrix. As a result it will appear behind everything else, won´t be clipped and won´t clip anything and just replace the clear color as it should.
As far as I know gamestudio does this by default, but since you messed with it more than I did you probably know better how you can or can´t use this shader with gamestudio sky system or replace it with your own custom sky rendering.