Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PostProcessingEffects"/> class.
 /// </summary>
 public PostProcessingEffects()
 {
     AmbientOcclusion     = new AmbientOcclusion();
     LocalReflections     = new LocalReflections();
     DepthOfField         = new DepthOfField();
     luminanceEffect      = new LuminanceEffect();
     BrightFilter         = new BrightFilter();
     Bloom                = new Bloom();
     LightStreak          = new LightStreak();
     LensFlare            = new LensFlare();
     Antialiasing         = new FXAAEffect();
     rangeCompress        = new ImageEffectShader("RangeCompressorShader");
     rangeDecompress      = new ImageEffectShader("RangeDecompressorShader");
     colorTransformsGroup = new ColorTransformGroup();
 }
Ejemplo n.º 2
0
        protected override void InitializeCore()
        {
            base.InitializeCore();

            AmbientOcclusion = ToLoadAndUnload(AmbientOcclusion);
            LocalReflections = ToLoadAndUnload(LocalReflections);
            DepthOfField     = ToLoadAndUnload(DepthOfField);
            luminanceEffect  = ToLoadAndUnload(luminanceEffect);
            BrightFilter     = ToLoadAndUnload(BrightFilter);
            Bloom            = ToLoadAndUnload(Bloom);
            LightStreak      = ToLoadAndUnload(LightStreak);
            LensFlare        = ToLoadAndUnload(LensFlare);
            //this can be null if no SSAA is selected in the editor
            if (Antialiasing != null)
            {
                Antialiasing = ToLoadAndUnload(Antialiasing);
            }

            rangeCompress   = ToLoadAndUnload(rangeCompress);
            rangeDecompress = ToLoadAndUnload(rangeDecompress);

            colorTransformsGroup = ToLoadAndUnload(colorTransformsGroup);
        }