Not sure if this is what you are looking for but this is an excellent tutorial that explains how to create tesselation in a material with distance based intensity.