For anyone who is interested (especially Carlos), Ive completed the shader.
It can be found in my shader thread
HERE.
Its also got a complete description of how to use it, and
a summary of what it does and where you would want to use it.
And is also packed with a sample script to test it with...
Carlos: Its a bit more complex LOOKING then what we've
discussed here, but thats from added flexability.
It can be made MUCH simpler to look at if we put the
cut-off heights back in as hard-coded numbers.
If you wanna do that, keep it to this thread...
Same goes for any bugs you find in getting it to suit YOUR needs...