예제 #1
0
        /// <summary>
        /// Render all ghost effects
        /// </summary>
        /// <param name="camera"></param>
        private void RenderGhosts(Camera camera)
        {
            if (ghostList.Count > 0)
            {
                if (ghostList.Count > 1)
                {
                    ghostList.Sort(_CompareGhostByDist);
                }

                RenderEffect was = renderEffects;
                renderEffects = RenderEffect.GhostPass;

                for (int i = 0; i < ghostList.Count; ++i)
                {
                    float opacity = ghostList[i].Opacity;
                    float glow    = ghostList[i].Glow;

                    ShaderGlobals.FixExplicitBloom(glow);
                    ShaderGlobals.FixBloomColor(new Vector4(opacity, opacity, opacity, 1.0f));
                    ghostList[i].Actor.RenderObject.Render(camera);
                }
                ShaderGlobals.ReleaseExplicitBloom();
                ShaderGlobals.ReleaseBloomColor();

                renderEffects = was;
            }
        }