Photodissociation of H2 in protogalaxies: modelling self-shielding in three-dimensional simulations | Synapse