Exemple #1
0
        public BlitMode SetKeyword()
        {
            foreach (BlitMode bs in AllModes)
            {
                if (bs != this)
                {
                    string name = bs.ShaderKeyword;
                    if (name != null)
                    {
                        BlitModeExtensions.KeywordSet(name, false);
                    }
                }
            }

            if (ShaderKeyword != null)
            {
                BlitModeExtensions.KeywordSet(ShaderKeyword, true);
            }

            return(this);
        }
Exemple #2
0
        public void SetKeyword(bool texcoord2)
        {
            foreach (BrushType bs in AllTypes)
            {
                string name = bs.ShaderKeyword(true);
                if (name != null)
                {
                    Shader.DisableKeyword(name);
                }

                name = bs.ShaderKeyword(false);
                if (name != null)
                {
                    Shader.DisableKeyword(name);
                }
            }

            if (ShaderKeyword(texcoord2) != null)
            {
                BlitModeExtensions.KeywordSet(ShaderKeyword(texcoord2), true);
            }
        }