/// <summary> /// Initializes a new instance of the <see cref="Afterimage"/> class. /// </summary> public Afterimage() { bloomAfterimageShader = new ImageEffectShader("BloomAfterimageShader"); bloomAfterimageCombineShader = new ImageEffectShader("BloomAfterimageCombineShader"); FadeOutSpeed = 0.9f; Sensitivity = 0.1f; }
protected override void InitializeCore() { base.InitializeCore(); effect = ToLoadAndUnload(new ImageEffectShader("DepthMinMaxEffect")); readback = ToLoadAndUnload(new ImageReadback <Vector2>(Context)); }
protected override void InitializeCore() { base.InitializeCore(); effect = ToLoadAndUnload(new ImageEffectShader("DepthMinMaxEffect")); readback = ToLoadAndUnload(new ImageReadback<Vector2>(Context)); }
/// <summary> /// Initializes a new instance of the <see cref="BrightFilter"/> class. /// </summary> /// <param name="brightPassShaderName">Name of the bright pass shader.</param> public BrightFilter(string brightPassShaderName) : base(brightPassShaderName) { if (brightPassShaderName == null) { throw new ArgumentNullException("brightPassShaderName"); } brightPassFilter = new ImageEffectShader(brightPassShaderName); }
protected override void InitializeCore() { base.InitializeCore(); combiner = ToLoadAndUnload(new ColorCombiner()); blur = ToLoadAndUnload(new GaussianBlur()); lightStreakEffect = ToLoadAndUnload(new ImageEffectShader("LightStreakEffect")); }
protected override void InitializeCore() { base.InitializeCore(); blur = ToLoadAndUnload(new GaussianBlur()); flareArtifactEffect = ToLoadAndUnload(new ImageEffectShader("FlareArtifactEffect")); flareReplicateEffect = ToLoadAndUnload(new ImageEffectShader("FlareReplicate")); }
/// <inheritdoc/> protected override void InitializeCore() { base.InitializeCore(); transformGroupEffect = new ImageEffectShader(colorTransformGroupEffectName); transformGroupEffect.SharedParameterCollections.Add(Parameters); transformGroupEffect.Initialize(Context); // we are adding parameter collections after as transform parameters should override previous parameters transformGroupEffect.ParameterCollections.Add(transformsParameters); this.transformContext = new ColorTransformContext(this); }
protected override void InitializeCore() { base.InitializeCore(); coclinearDepthMapEffect = ToLoadAndUnload(new ImageEffectShader("CoCLinearDepthShader")); combineLevelsEffect = ToLoadAndUnload(new ImageEffectShader("CombineLevelsFromCoCEffect")); combineLevelsFrontEffect = ToLoadAndUnload(new ImageEffectShader("CombineFrontCoCEffect")); textureScaler = ToLoadAndUnload(new ImageScaler()); cocMapBlur = ToLoadAndUnload(new CoCMapBlur()); thresholdAlphaCoC = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoC")); thresholdAlphaCoCFront = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoCFront")); pointDepthShader = ToLoadAndUnload(new ImageEffectShader("PointDepth")); depthReadBack = ToLoadAndUnload(new ImageReadback <Half>()); depthCenter1x1 = Texture.New2D(GraphicsDevice, 1, 1, 1, PixelFormat.R16_Float, TextureFlags.ShaderResource | TextureFlags.RenderTarget).DisposeBy(this); }
/// <inheritdoc/> protected override void InitializeCore() { base.InitializeCore(); // Use shared SharedParameters for blurH and blurV blurH = ToLoadAndUnload(new ImageEffectShader("GaussianBlurEffect")); blurH.SharedParameterCollections.Add(Parameters); blurH.Initialize(Context); // Setup specific Horizontal parameter for blurH blurH.Parameters.Set(GaussianBlurKeys.VerticalBlur, false); blurV = ToLoadAndUnload(new ImageEffectShader("GaussianBlurEffect")); blurV.SharedParameterCollections.Add(Parameters); blurV.Initialize(Context); // Setup specific Vertical parameter for blurV blurV.Parameters.Set(GaussianBlurKeys.VerticalBlur, true); }
protected override void InitializeCore() { base.InitializeCore(); coclinearDepthMapEffect = ToLoadAndUnload(new ImageEffectShader("CoCLinearDepthShader")); combineLevelsEffect = ToLoadAndUnload(new ImageEffectShader("CombineLevelsFromCoCEffect")); combineLevelsFrontEffect = ToLoadAndUnload(new ImageEffectShader("CombineFrontCoCEffect")); textureScaler = ToLoadAndUnload(new ImageScaler()); cocMapBlur = ToLoadAndUnload(new CoCMapBlur()); thresholdAlphaCoC = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoC")); thresholdAlphaCoCFront = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoCFront")); pointDepthShader = ToLoadAndUnload(new ImageEffectShader("PointDepth")); depthReadBack = ToLoadAndUnload(new ImageReadback<Half>(Context)); depthCenter1x1 = Texture.New2D(GraphicsDevice, 1, 1, 1, PixelFormat.R16_Float, TextureFlags.ShaderResource | TextureFlags.RenderTarget).DisposeBy(this); depthReadBack.SetInput(depthCenter1x1); }
/// <summary> /// Initializes a new instance of the <see cref="BrightFilter"/> class. /// </summary> /// <param name="brightPassShaderName">Name of the bright pass shader.</param> public BrightFilter(string brightPassShaderName) : base(brightPassShaderName) { if (brightPassShaderName == null) throw new ArgumentNullException("brightPassShaderName"); brightPassFilter = new ImageEffectShader(brightPassShaderName); }
protected override void InitializeCore() { base.InitializeCore(); skyboxEffect = ToLoadAndUnload(new ImageEffectShader("SkyboxEffect")); }