We study a pattern forming instability in a laser driven optically thick cloud of cold two-level atoms with a planar feedback mirror. A theoretical model is developed, enabling a full analysis of transverse patterns in a medium with saturable nonlinearity, taking into account diffraction within the medium, and both the transmission and reflection gratings. Focus of the analysis is on combined treatment of nonlinear propagation in a diffractively- and optically-thick medium and the boundary condition given by feedback. We demonstrate explicitly how diffraction within the medium breaks the degeneracy of Talbot modes inherent in thin slice models. Existence of envelope curves bounding all possible pattern formation thresholds is predicted. The importance of envelope curves and their interaction with threshold curves is illustrated by experimental observation of a sudden transition between length scales as mirror displacement is varied.