这个常量可以用于所有的材质类型。首先将材质的混合模式设置为v3d.CustomBlending,然后设置所需要的混合方程、源因子和目标因子。
const material = new v3d.MeshBasicMaterial({color: 0x00ff00});
material.blending = v3d.CustomBlending;
material.blendEquation = v3d.AddEquation; //default
material.blendSrc = v3d.SrcAlphaFactor; //default
material.blendDst = v3d.OneMinusSrcAlphaFactor; //default
v3d.AddEquation
v3d.SubtractEquation
v3d.ReverseSubtractEquation
v3d.MinEquation
v3d.MaxEquation
v3d.ZeroFactor
v3d.OneFactor
v3d.SrcColorFactor
v3d.OneMinusSrcColorFactor
v3d.SrcAlphaFactor
v3d.OneMinusSrcAlphaFactor
v3d.DstAlphaFactor
v3d.OneMinusDstAlphaFactor
v3d.DstColorFactor
v3d.OneMinusDstColorFactor
v3d.SrcAlphaSaturateFactor
所有的源因子的值,在目标因子中都是有效的。除了:v3d.SrcAlphaSaturateFactor