One script to switch between material types