Exemplo n.º 1
0
        protected override void OnEnable()
        {
            instance               = this;
            this.camera            = Rendering.CreateCameraWorld(this.SceneObject, ClientAmbientOcclusion.RenderingTag, -1000);
            this.camera.ClearColor = ClientAmbientOcclusion.IsDisplayMask
                                         ? Color.FromArgb(0x99, 0xFF, 0xFF, 0xFF)
                                         : Color.FromArgb(0x00, 0x00, 0x00, 0x00); // transparent black
            this.camera.DrawMode = CameraDrawMode.Manual;

            this.blurPostEffect = new BlurPostEffect
            {
                RenderTextureDownsampling = 1,
                Passes    = 2,
                IsEnabled = true
            };

            this.layerRenderer = Client.Rendering.CreateLayerRenderer(
                this.SceneObject,
                TextureResource.NoTexture,
                drawOrder: ClientAmbientOcclusion.IsDisplayMask
                //  display as overlay (over everything)
                               ? DrawOrder.Overlay
                               : DrawOrder.Occlusion);

            this.layerRenderer.CustomDraw += this.LayerRendererBeforeDrawHandler;

            this.effectInstanceCompose = EffectInstance.Create(EffectResourceAmbientOcclusionCompose);
        }
Exemplo n.º 2
0
 protected override void OnEnable()
 {
     this.device               = Rendering.GraphicsDevice;
     this.effectBloomCombine   = EffectInstance.Create(EffectResourceBloomCombine);
     this.effectBloomExtract   = EffectInstance.Create(EffectResourceBloomExtract);
     this.effectBlurHorizontal = EffectInstance.Create(EffectResourceGaussianBlur);
     this.effectBlurVertical   = EffectInstance.Create(EffectResourceGaussianBlur);
 }
Exemplo n.º 3
0
 public EffectObjectOutline()
 {
     this.device = Rendering.GraphicsDevice;
     this.effect = EffectInstance.Create(new EffectResource("Special/ObjectOutline"));
 }