예제 #1
0
 /// <summary>
 /// Creates a NonPremultiplied blend state.
 /// </summary>
 /// <param name="uv">The Ultraviolet context.</param>
 /// <returns>The blend state that was created.</returns>
 public static OpenGLBlendState CreateNonPremultiplied(UltravioletContext uv)
 {
     var state = new OpenGLBlendState(uv);
     state.AlphaSourceBlend = Blend.SourceAlpha;
     state.AlphaDestinationBlend = Blend.InverseSourceAlpha;
     state.ColorSourceBlend = Blend.SourceAlpha;
     state.ColorDestinationBlend = Blend.InverseSourceAlpha;
     state.MakeImmutable();
     return state;
 }
예제 #2
0
 /// <summary>
 /// Creates an Additive blend state.
 /// </summary>
 /// <param name="uv">The Ultraviolet context.</param>
 /// <returns>The blend state that was created.</returns>
 public static OpenGLBlendState CreateAdditive(UltravioletContext uv)
 {
     var state = new OpenGLBlendState(uv);
     state.AlphaSourceBlend = Blend.SourceAlpha;
     state.AlphaDestinationBlend = Blend.One;
     state.ColorSourceBlend = Blend.SourceAlpha;
     state.ColorDestinationBlend = Blend.One;
     state.MakeImmutable();
     return state;
 }
예제 #3
0
        /// <summary>
        /// Creates a NonPremultiplied blend state.
        /// </summary>
        /// <param name="uv">The Ultraviolet context.</param>
        /// <returns>The blend state that was created.</returns>
        public static OpenGLBlendState CreateNonPremultiplied(UltravioletContext uv)
        {
            var state = new OpenGLBlendState(uv);

            state.AlphaSourceBlend      = Blend.SourceAlpha;
            state.AlphaDestinationBlend = Blend.InverseSourceAlpha;
            state.ColorSourceBlend      = Blend.SourceAlpha;
            state.ColorDestinationBlend = Blend.InverseSourceAlpha;
            state.MakeImmutable();
            return(state);
        }
예제 #4
0
        /// <summary>
        /// Creates an Additive blend state.
        /// </summary>
        /// <param name="uv">The Ultraviolet context.</param>
        /// <returns>The blend state that was created.</returns>
        public static OpenGLBlendState CreateAdditive(UltravioletContext uv)
        {
            var state = new OpenGLBlendState(uv);

            state.AlphaSourceBlend      = Blend.SourceAlpha;
            state.AlphaDestinationBlend = Blend.One;
            state.ColorSourceBlend      = Blend.SourceAlpha;
            state.ColorDestinationBlend = Blend.One;
            state.MakeImmutable();
            return(state);
        }