Here is a simple formula for calculating "organic porosity" formed as a result of converting kerogen to petroleum.
Organic
porosity (% rock volume) = TR(fraction)*HI (mg/gTOC)*TOC(% weight)*2.5/1.2/1150,
where TR is transformation ratio (the fraction of the labile kerogen that has already converted to petroleum), and HI is hydrogen index when it was immature, and TOC is original TOC. The constant 2.5 is rock density and 1.2 is kerogen density in g/cc, and 1150 is the
equivalent HI of hydrocarbons.
For a source rock with 5% initial TOC and 600 HI, the organic porosity generated is 2.7% at TR=0.5 and 5.4% rock volume at TR=1 (full transformation). TR is usually calculated using a kinetic model. Original HI and TOC before source rock is mature can be obtained from an immature part of the source rock - typically up dip. Various methods have been proposed to estimate original TOC and HI from mature samples - but typically they are not reliable - due to the assumptions made. It will be a subject for a post another day...
The organic porosity may or may not be actually preserved in a shale. Studies have shown that source rocks with higher clay content (the KCF shale, Shahejie shale of Bohai Bay) may not have preserved such porosity. This is perhaps because the ductile clay would continue to allow compaction of the rock during petroleum generation. Most of the North American producing shales, such as the Eagleford and Barnett, have very low clay content - and some show significant early cementation which may have prevented further compaction and help preserve the organic porosity formed during hydrocarbon generation.
The organic porosity is different from normal inorganic porosity in that it is likely petroleum wet. This means high (100%) saturation petroleum is expected that help retain petroleum in the source rock.