Emission from an inhomogeneous layer with irregular interfaces