Turns out, I was using the wrong formula. Look at my sample, fully modifiable project that explains this effect. I used far more comments than I normally do to help explain what various parts of the code does. Oddly enough, the scene flag isn't working - invalid parameter. Looks like I ran into an issue I encountered earlier (but this time, I have a sky block).
Download it here (ZIP file - 418 KB)
Edit: changed the subject to indicate I have the sample