Shock induced polymorphic transition in quartz, carbon, and boron nitride