/// <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); }
/// <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); } } }