For glsl compacting

Not the best way to do it (duplicated instances) but here's the pull request. Sorry about the delay, I've been over-busy at work.