/// <summary> /// specify pixel arithmetic for RGB and alpha components separately. /// </summary> /// <param name="sourceFactor">Specifies how the red, green and blue source blending factors are computedThe initial value is GL_ONE.</param> /// <param name="destFactor">Specifies how the red, green and blue alpha destination blending factors are computed. The initial value is GL_ZERO.</param> /// <param name="sourceAlphaFactor">Specifies how the alpha source blending factors are computedThe initial value is GL_ONE.</param> /// <param name="destAlphaFactor">Specifies how the alpha destination blending factors are computed. The initial value is GL_ZERO.</param> /// <param name="enableCapacity"></param> public BlendFuncSeparateSwitch(BlendSrcFactor sourceFactor, BlendDestFactor destFactor, BlendSrcFactor sourceAlphaFactor, BlendDestFactor destAlphaFactor, bool enableCapacity = true) : base(GL.GL_BLEND, enableCapacity) { this.SourceFactor = sourceFactor; this.DestFactor = destFactor; this.SourceAlphaFactor = sourceAlphaFactor; this.DestAlphaFactor = destAlphaFactor; }
internal ShaderStateAlphaBlendStateBlockBase(BinaryReader binaryReader) { this.blendFunction = (BlendFunction)binaryReader.ReadInt16(); this.blendSrcFactor = (BlendSrcFactor)binaryReader.ReadInt16(); this.blendDstFactor = (BlendDstFactor)binaryReader.ReadInt16(); this.invalidName_ = binaryReader.ReadBytes(2); this.blendColor = binaryReader.ReadColourA1R1G1B1(); this.logicOpFlags = (LogicOpFlags)binaryReader.ReadInt16(); this.invalidName_0 = binaryReader.ReadBytes(2); }
/// <summary> /// specify pixel arithmetic for RGB and alpha components separately. /// </summary> /// <param name="rgbMode">set the RGB blend equation.</param> /// <param name="alphaMode">set the Alpha blend equation.</param> /// <param name="rgbSrcFactor">Specifies how the red, green and blue source blending factors are computedThe initial value is GL_ONE.</param> /// <param name="rgbDestFactor">Specifies how the red, green and blue destination blending factors are computed. The initial value is GL_ZERO.</param> /// <param name="alphaSrcFactor">Specifies how the alpha source blending factors are computed. The initial value is GL_ONE.</param> /// <param name="alphaDestFactor">Specifies how the alpha destination blending factors are computed. The initial value is GL_ZERO.</param> /// <param name="enableCapacity"></param> public BlendSwitch(BlendEquationMode rgbMode, BlendEquationMode alphaMode, BlendSrcFactor rgbSrcFactor, BlendDestFactor rgbDestFactor, BlendSrcFactor alphaSrcFactor, BlendDestFactor alphaDestFactor, bool enableCapacity = true) : base(GL.GL_BLEND, enableCapacity) { this.RGBMode = rgbMode; this.AlphaMode = alphaMode; this.RGBSrcFactor = rgbSrcFactor; this.RGBDestFactor = rgbDestFactor; this.AlphaSrcFactor = alphaSrcFactor; this.AlphaDestFactor = alphaDestFactor; }
private void SetupBlending(SceneNodeBase sceneNodeBase, BlendSrcFactor sf, BlendDestFactor df) { var node = sceneNodeBase as RectGlassNode; if (node != null) { node.Blend.SourceFactor = sf; node.Blend.DestFactor = df; } foreach (var item in sceneNodeBase.Children) { SetupBlending(item, sf, df); } }
public void GetNext(out BlendSrcFactor source, out BlendDestFactor dest) { source = sourceFactors[currentSource]; dest = destFactors[currentDest]; currentDest++; if (currentDest >= destFactors.Length) { currentDest = 0; currentSource++; if (currentSource >= sourceFactors.Length) { currentSource = 0; } } }
private void SetupBlending(SceneNodeBase sceneNodeBase, BlendSrcFactor s, BlendDestFactor d) { var node = sceneNodeBase as TextBillboardNode; if (node != null) { node.Blend.SourceFactor = s; node.Blend.DestFactor = d; } foreach (var item in sceneNodeBase.Children) { SetupBlending(item, s, d); } }
/// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="dest"></param> public BlendingGroupNode(BlendSrcFactor source, BlendDestFactor dest) { this.blending = new BlendFuncSwitch(source, dest); }
/// <summary> /// specify pixel arithmetic for RGB and alpha components separately. /// </summary> /// <param name="mode">set the blend equation.</param> /// <param name="srcFactor">Specifies how the red, green, blue and alpha source blending factors are computed. The initial value is GL_ONE.</param> /// <param name="destFactor">Specifies how the red, green blue and alpha destination blending factors are computed. The initial value is GL_ZERO.</param> /// <param name="enableCapacity"></param> public BlendSwitch(BlendEquationMode mode, BlendSrcFactor srcFactor, BlendDestFactor destFactor, bool enableCapacity = true) : this(mode, mode, srcFactor, destFactor, srcFactor, destFactor, enableCapacity) { }
/// <summary> /// specify pixel arithmetic for RGB and alpha components separately. /// </summary> /// <param name="mode">set the blend equation.</param> /// <param name="rgbSrcFactor">Specifies how the red, green and blue source blending factors are computedThe initial value is GL_ONE.</param> /// <param name="rgbDestFactor">Specifies how the red, green and blue destination blending factors are computed. The initial value is GL_ZERO.</param> /// <param name="alphaSrcFactor">Specifies how the alpha source blending factors are computed. The initial value is GL_ONE.</param> /// <param name="alphaDestFactor">Specifies how the alpha destination blending factors are computed. The initial value is GL_ZERO.</param> /// <param name="enableCapacity"></param> public BlendSwitch(BlendEquationMode mode, BlendSrcFactor rgbSrcFactor, BlendDestFactor rgbDestFactor, BlendSrcFactor alphaSrcFactor, BlendDestFactor alphaDestFactor, bool enableCapacity = true) : this(mode, mode, rgbSrcFactor, rgbDestFactor, alphaSrcFactor, alphaDestFactor, enableCapacity) { }
/// <summary> /// /// </summary> /// <param name="srcFactor"></param> public void SetSrcFactor(BlendSrcFactor srcFactor) { this.rgbSrcFactor = (uint)srcFactor; this.alphaSrcFactor = (uint)srcFactor; }