yep what i had was only based on distance
finaly got yours to work. wasn't just the skybox that was my problem. I had my camera attached to my entity so had to have it ignore the entity in the trace as well.
Heelix if what i think its doing is right. it checks to see if it hits a surface traced from screen x/y
if a surface is hit it then does a few random traces in a hemisphereical area in the direction of the surface normal, the more surfaces that it encounters near that surface, the darker in shades the pixels around that face is set. it also accounts for the 'shadowing'