changed Material.allocPass implementation