Exemple #1
0
        /// <summary>
        /// Set a 16 sample filter
        /// </summary>
        /// <param name="filter"></param>
        public void SetFilter(ref Filter16Sample 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);
            this.filter[4] = new Vector3(filter.PixelOffset4, filter.Weight4);
            this.filter[5] = new Vector3(filter.PixelOffset5, filter.Weight5);
            this.filter[6] = new Vector3(filter.PixelOffset6, filter.Weight6);
            this.filter[7] = new Vector3(filter.PixelOffset7, filter.Weight7);

            this.filter[8]  = new Vector3(filter.PixelOffset8, filter.Weight8);
            this.filter[9]  = new Vector3(filter.PixelOffset9, filter.Weight9);
            this.filter[10] = new Vector3(filter.PixelOffset10, filter.Weight10);
            this.filter[11] = new Vector3(filter.PixelOffset11, filter.Weight11);
            this.filter[12] = new Vector3(filter.PixelOffset12, filter.Weight12);
            this.filter[13] = new Vector3(filter.PixelOffset13, filter.Weight13);
            this.filter[14] = new Vector3(filter.PixelOffset14, filter.Weight14);
            this.filter[15] = new Vector3(filter.PixelOffset15, filter.Weight15);

            kernelSize = 16;
        }
		/// <summary>
		/// Set a 16 sample filter
		/// </summary>
		/// <param name="filter"></param>
		public void SetFilter(ref Filter16Sample 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);
			this.filter[4] = new Vector3(filter.PixelOffset4, filter.Weight4);
			this.filter[5] = new Vector3(filter.PixelOffset5, filter.Weight5);
			this.filter[6] = new Vector3(filter.PixelOffset6, filter.Weight6);
			this.filter[7] = new Vector3(filter.PixelOffset7, filter.Weight7);

			this.filter[8] = new Vector3(filter.PixelOffset8, filter.Weight8);
			this.filter[9] = new Vector3(filter.PixelOffset9, filter.Weight9);
			this.filter[10] = new Vector3(filter.PixelOffset10, filter.Weight10);
			this.filter[11] = new Vector3(filter.PixelOffset11, filter.Weight11);
			this.filter[12] = new Vector3(filter.PixelOffset12, filter.Weight12);
			this.filter[13] = new Vector3(filter.PixelOffset13, filter.Weight13);
			this.filter[14] = new Vector3(filter.PixelOffset14, filter.Weight14);
			this.filter[15] = new Vector3(filter.PixelOffset15, filter.Weight15);

			kernelSize = 16;
		}
Exemple #3
0
 /// <summary>
 /// Creates a single pass 16 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, Filter16Sample filter)
     : this(source, target)
 {
     SetFilter(ref filter);
 }
		/// <summary>
		/// Creates a single pass 16 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, Filter16Sample filter)
			: this(source, target)
		{
			SetFilter(ref filter);
		}