Custom Blending Equation Constants

Example

materials / blending / custom

Usage

These work with all material types. First set the material's blending mode to v3d.CustomBlending, then set the desired Blending Equation, Source Factor and Destination Factor.

var 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

Blending Equations

v3d.AddEquation v3d.SubtractEquation v3d.ReverseSubtractEquation v3d.MinEquation v3d.MaxEquation

Source Factors

v3d.ZeroFactor v3d.OneFactor v3d.SrcColorFactor v3d.OneMinusSrcColorFactor v3d.SrcAlphaFactor v3d.OneMinusSrcAlphaFactor v3d.DstAlphaFactor v3d.OneMinusDstAlphaFactor v3d.DstColorFactor v3d.OneMinusDstColorFactor v3d.SrcAlphaSaturateFactor

Destination Factors

All of the Source Factors are valid as Destination Factors, except for v3d.SrcAlphaSaturateFactor

Source

For more info on how to obtain the source code of this module see this page.