  We consider black holes which form from an initially spherically symmetric
super-Hubble perturbation of a cosmological background filled by a perfect
fluid $p=w \rho$ with $w\in (0,1]$. Previous work has shown that when $w = 1/3$
(radiation), there is a critical threshold for black hole formation
($\delta_c$), which, to a very good approximation, only depends upon the
curvature of the compaction function around its peak value. We find that this
generalizes to all $w\gtrsim 1/3$; for smaller $w$s the knowledge of the full
shape of the compaction function is necessary. We provide analytic
approximations for $\delta_c$ which are accurate for $w\in [1/3,1]$.
