Some time ago there was a "dissolving shader" written by some user. Maybe you could do a search on the user contrubutions forum or the shader forum for this. If I remember right this one could do what you want to achieve.
Always learn from history, to be sure you make the same mistakes again...