I'm a bit of a noob when it comes to shields, as none of my characters ever really used one before. So I'd like some clarification on how blocking DR works exactly.

From my understanding, it's Shield DR + BaB + passive DR (highest not broken) = blocking DR, correct? So a character with DR10/adamantine from Stoneskin, and say a Light and Darkness (DR7 IIRC) and 15 BaB would get, while shield blocking, DR32 total, assuming the Stoneskin isn't broken. Is that correct?

Also, does the percentage damage reduction from (Improved) Shield Mastery occure prior to the DR reduction, or after? For the above example, lets say I got hit for 50 points, and 32 was blocked. Would 20% of that (using easier number for example) be an additional 10 points off (20% of 50, -32) or 20% of 18 (50-32, -20%) or about 4 or so damage?

Thanks in advance.