Pattern formation during development often depends on the differential regulation of gene expression in response to a morphogen gradient, but how such gradients govern gene expression is unclear. A simplified view suggests that the morphogen activates a transcriptional activator, and that differential gene expression is dependent on the affinity or number of binding sites for this activator within target genes. However, this model does not account for bifunctional transcriptional effectors – those that function as activators and repressors – and has also been questioned by recent experimental results. Here, James Briscoe and colleagues describe a unifying mathematical model of morphogen-dependent gene expression that can explain recent counterintuitive findings (p. 3868). Using sonic hedgehog (Shh)-dependent patterning of the mouse neural tube as an example, the researchers develop mathematical models, based on statistical thermodynamic principles, that account for competitive binding of the active and repressive isoforms of Gli, the transcriptional effector of Shh, and that also represent other inputs that are known to regulate Shh target gene expression. Their modelling predicts that, for each Gli target gene, there is a neutral point in the Shh gradient, either side of which altering Gli binding affinity has the opposite effect on gene expression. They further report that inputs other than the morphogen determine the transcriptional response. Together, these analyses help reconcile conflicting results in the field and provide a theoretical framework that can be used to examine differential gene expression in other contexts.