Пример #1
0
        /// <summary>
        /// Disables blending
        /// </summary>
        public static RenderTargetBlendDesc BlendingDisabled()
        {
            var result = new RenderTargetBlendDesc()
            {
                blendingEnabled = false,
                writeMask       = BlendWriteMask.All
            };

            return(result);
        }
Пример #2
0
        /// <summary>
        /// Standard subtractive blending
        /// </summary>
        public static RenderTargetBlendDesc SubtractiveBlending()
        {
            var result = new RenderTargetBlendDesc()
            {
                blendingEnabled   = true,
                sourceFactor      = BlendFactor.One,
                destinationFactor = BlendFactor.One,
                operation         = BlendOperation.Subtract,
                writeMask         = BlendWriteMask.All
            };

            return(result);
        }
Пример #3
0
        /// <summary>
        /// Standard alpha blending
        /// </summary>
        public static RenderTargetBlendDesc AlphaBlending()
        {
            var result = new RenderTargetBlendDesc()
            {
                blendingEnabled   = true,
                sourceFactor      = BlendFactor.SourceAlpha,
                destinationFactor = BlendFactor.SourceAlphaInverse,
                operation         = BlendOperation.Add,
                writeMask         = BlendWriteMask.All
            };

            return(result);
        }