예제 #1
0
        /// <summary>
        /// Set a 4 sample filter
        /// </summary>
        /// <param name="filter"></param>
        public void SetFilter(ref Filter4Sample filter)
        {
            this.filter[0] = new Vector3(filter.PixelOffset0, filter.Weight0);
            this.filter[1] = new Vector3(filter.PixelOffset1, filter.Weight1);
            this.filter[2] = new Vector3(filter.PixelOffset2, filter.Weight2);
            this.filter[3] = new Vector3(filter.PixelOffset3, filter.Weight3);

            kernelSize = 4;
        }
		/// <summary>
		/// Set a 4 sample filter
		/// </summary>
		/// <param name="filter"></param>
		public void SetFilter(ref Filter4Sample filter)
		{
			this.filter[0] = new Vector3(filter.PixelOffset0, filter.Weight0);
			this.filter[1] = new Vector3(filter.PixelOffset1, filter.Weight1);
			this.filter[2] = new Vector3(filter.PixelOffset2, filter.Weight2);
			this.filter[3] = new Vector3(filter.PixelOffset3, filter.Weight3);

			kernelSize = 4;
		}
예제 #3
0
 /// <summary>
 /// Creates a single pass 4 sample filter
 /// </summary>
 /// <param name="source">soure texture to filter</param>
 /// <param name="target">target to filter</param>
 /// <param name="filter">Filter to apply</param>
 public SinglePassTextureFilter(DrawTargetTexture2D source, DrawTargetTexture2D target, Filter4Sample filter)
     : this(source, target)
 {
     SetFilter(ref filter);
 }
		/// <summary>
		/// Creates a single pass 4 sample filter
		/// </summary>
		/// <param name="source">soure texture to filter</param>
		/// <param name="target">target to filter</param>
		/// <param name="filter">Filter to apply</param>
		public SinglePassTextureFilter(DrawTargetTexture2D source, DrawTargetTexture2D target, Filter4Sample filter)
			: this(source, target)
		{
			SetFilter(ref filter);
		}