Added vec3, vertex position dimension parameter.