Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SepiaMaterial"/> class.
        /// </summary>
        public FishEyeMaterial()
            : base(DefaultLayers.Opaque)
        {
            this.Intensity = new Vector2(0.001f);
            this.shaderParameters = new FishEyeEffectParameters();
            this.shaderParameters.Intensity = this.Intensity;
            this.Parameters = this.shaderParameters;

            this.InitializeTechniques(techniques);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SepiaMaterial"/> class.
        /// </summary>
        public FishEyeMaterial()
            : base(DefaultLayers.Opaque)
        {
            this.Intensity                  = new Vector2(0.001f);
            this.shaderParameters           = new FishEyeEffectParameters();
            this.shaderParameters.Intensity = this.Intensity;
            this.Parameters                 = this.shaderParameters;

            this.InitializeTechniques(techniques);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Applies the pass.
        /// </summary>
        /// <param name="cached">The efect is cached.</param>
        public override void SetParameters(bool cached)
        {
            if (!cached)
            {
                this.shaderParameters           = new FishEyeEffectParameters();
                this.shaderParameters.Intensity = this.Intensity;

                this.Parameters = this.shaderParameters;

                if (this.Texture != null)
                {
                    this.graphicsDevice.SetTexture(this.Texture, 0);
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Applies the pass.
        /// </summary>
        /// <param name="cached">The efect is cached.</param>
        public override void SetParameters(bool cached)
        {
            if (!cached)
            {
                this.shaderParameters = new FishEyeEffectParameters();
                this.shaderParameters.Intensity = this.Intensity;

                this.Parameters = this.shaderParameters;

                if (this.Texture != null)
                {
                    this.graphicsDevice.SetTexture(this.Texture, 0);
                }
            }
        }