Пример #1
0
        private static BlendStateDescription GetBlendState(ParticleSystemShader shader)
        {
            switch (shader)
            {
            case ParticleSystemShader.Alpha:
                return(BlendStateDescription.AlphaBlend);

            case ParticleSystemShader.Additive:
                return(BlendStateDescription.Additive);

            default:
                throw new ArgumentOutOfRangeException(nameof(shader));
            }
        }
Пример #2
0
        public Pipeline GetCachedPipeline(ParticleSystemShader shader)
        {
            switch (shader)
            {
            case ParticleSystemShader.Alpha:
            case ParticleSystemShader.AlphaTest:     // TODO: proper implementation for AlphaTest
                return(_alphaPipeline);

            case ParticleSystemShader.Additive:
                return(_additivePipeline);

            default:
                throw new ArgumentOutOfRangeException(nameof(shader));
            }
        }