generalized program creation for materialshader