update material and shader