示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BloomMaterial"/> class.
        /// </summary>
        public BloomMaterial()
            : base(DefaultLayers.Opaque)
        {
            this.TexcoordOffset = Vector2.Zero;
            this.BloomThreshold = 0.4f;
            this.BloomScale     = 8.0f;
            this.Intensity      = 3f;
            this.BloomTint      = Color.White.ToVector3();

            this.shaderParameters = new BloomEffectParameters();
            this.shaderParameters.TexcoordOffset = this.TexcoordOffset;
            this.shaderParameters.BloomTint      = this.BloomTint;
            this.shaderParameters.Intensity      = this.Intensity;
            this.shaderParameters.BloomThreshold = this.BloomThreshold;
            this.shaderParameters.BloomScale     = this.BloomScale;
            this.Parameters = this.shaderParameters;

            this.InitializeTechniques(techniques);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BloomMaterial"/> class.
        /// </summary>
        public BloomMaterial()
            : base(DefaultLayers.Opaque)
        {
            this.SamplerMode = AddressMode.LinearClamp;
            this.TexcoordOffset = Vector2.Zero;
            this.BloomThreshold = 0.4f;
            this.BloomScale = 8.0f;
            this.Intensity = 3f;
            this.BloomTint = Color.White.ToVector3();

            this.shaderParameters = new BloomEffectParameters();
            this.shaderParameters.TexcoordOffset = this.TexcoordOffset;
            this.shaderParameters.BloomTint = this.BloomTint;
            this.shaderParameters.Intensity = this.Intensity;
            this.shaderParameters.BloomThreshold = this.BloomThreshold;
            this.shaderParameters.BloomScale = this.BloomScale;
            this.Parameters = this.shaderParameters;

            this.InitializeTechniques(techniques);
        }