Material IDs when using distance texture

Does anyone know if it is possible to get material IDs when using distance texture to define different materials in a CoronaLayered material?