Example #1
0
        private void Render(GameTime gameTime, IAether particle)
        {
            Matrix worldTransform;

            LeptonsManager.GetWorldTransform(particle, out worldTransform);

            IPhoton   photon   = particle as IPhoton;
            IMaterial material = (photon != null) ? photon.Material : null;

            if (photon != null && material != null)
            {
                ((IShaderMatrices)material).World      = worldTransform;
                ((IShaderMatrices)material).View       = this.View;
                ((IShaderMatrices)material).Projection = this.Projection;
                material.Apply();
                material.ApplyTextures(photon.Textures);
                photon.Accept(material);
                return;
            }

            return;
        }