Exemple #1
0
        /// <summary>
        /// Function to setup the Render Properties (i.e. BlendState, DepthStencilState, RasterizerState, and SamplerState)
        /// which will be applied to the Graphics Device before drawing the Particle System's Particles.
        /// <para>This function is called when initializing the particle system.</para>
        /// </summary>
        protected override void InitializeRenderProperties()
        {
            //-----------------------------------------------------------
            // TODO: Set any render properties required before drawing
            //-----------------------------------------------------------

            // We use the Alpha Test Effect by default for 3D Sprites
            this.Effect = new AlphaTestEffect(this.GraphicsDevice);
            RenderProperties.RasterizerState = DPSFHelper.CloneRasterizerState(RasterizerState.CullNone);
        }