The unique affix takes all damage done by the last 5 Shield Bash casts to all enemies into account; if no enemies were hit, no damage will be added to the Shield Glare. Accumulated damage is fully applied to each enemy affected by Shield Glare, not split among them. Each cast of Shield Bash adds a stack, which is consumed when casting Shield Glare.
The damage takes into account Shield Bash damage affix bonuses from gear. Damage stacks will persist through changing gear and picking up items, and are only canceled upon death.