public static void SetBlendMode(this MaterialPropertyBlock pb, DRenderMode rm) { var(src, dst, op) = rm.ToBlendVars(); pb.SetFloat(PropConsts.blendSrcMethod, src); pb.SetFloat(PropConsts.blendDstMethod, dst); pb.SetFloat(PropConsts.blendOp, (int)op); }
public static void SetBlendMode(Material mat, DRenderMode rm) { var(src, dst, op) = rm.ToBlendVars(); mat.SetFloat(PropConsts.blendSrcMethod, src); mat.SetFloat(PropConsts.blendDstMethod, dst); mat.SetFloat(PropConsts.blendOp, (int)op); }