示例#1
0
     public FloatingColor Filter(FloatingColor Base, FloatingColor Blend)
     {
         if (Blend.Luminosity() > .5)
         {
             return new FloatingColor()
                    {
                        R = Math.Max(Base.R, Blend.R),
                        G = Math.Max(Base.G, Blend.G),
                        B = Math.Max(Base.B, Blend.B),
                        A = Base.A
                    }
         }
         ;
         else
         {
             return new FloatingColor()
                    {
                        R = Math.Min(Base.R, Blend.R),
                        G = Math.Min(Base.G, Blend.G),
                        B = Math.Min(Base.B, Blend.B),
                        A = Base.A
                    }
         };
     }
 }
示例#2
0
 public FloatingColor Filter(FloatingColor Base, FloatingColor Blend)
 {
     if (Blend.Luminosity() > .5)
     {
         return(1 + 2 * Blend * (1 - Base));
     }
     else
     {
         return(2 * Base * Blend);
     }
 }
示例#3
0
 public FloatingColor Filter(FloatingColor Base, FloatingColor Blend)
 {
     if (Blend.Luminosity() > .5)
     {
         return(1 - (1 - Blend) * (1.5f - Base));
     }
     else
     {
         return(Blend * (Base + .5f));
     }
 }
示例#4
0
 public FloatingColor Filter(FloatingColor Base, FloatingColor Blend)
 {
     if (Blend.Luminosity() > .5)
     {
         return(1 - (1 - Blend) * (-2 * Base));
     }
     else
     {
         return(Blend / (1 - 2 * Base));
     }
 }
示例#5
0
 public FloatingColor Evaluate(FloatingColor C)
 {
     return(Evaluate(C.Luminosity()));
 }