Intermediate layers comprising a mixture of materials of the adjoining active layers