Example #1
0
        public Material getMaterial(bool ignoreClip)
        {
            var key = ignoreClip ? 1 : 0;
            var mat = this._materials[key];

            if (mat)
            {
                return(mat);
            }

            mat = new Material(this._shader)
            {
                hideFlags = HideFlags.HideAndDontSave
            };
            MaterialProps.set(mat, ignoreClip ? CompareFunction.Always : CompareFunction.Equal);

            this._materials[key] = mat;
            return(mat);
        }
Example #2
0
        public Material getMaterial(BlendMode op)
        {
            var key = (int)op;
            var mat = this._materials[key];

            if (mat)
            {
                return(mat);
            }

            mat = new Material(this._shader)
            {
                hideFlags = HideFlags.HideAndDontSave
            };
            MaterialProps.set(mat, op);

            this._materials[key] = mat;
            return(mat);
        }